text stringlengths 8 4.13M |
|---|
extern crate rustc_serialize;
extern crate toml_config;
use std::path::Path;
use self::toml_config::ConfigFactory;
#[derive(RustcDecodable, RustcEncodable)]
pub struct Config {
pub redis: RedisConfig,
pub server: ServerConfig,
pub source: SourceConfig,
}
impl Config {
pub fn redis_url(&self) -> String {
self.redis.url()
}
pub fn server_url(&self) -> String {
self.server.url()
}
pub fn source_url(&self) -> String {
self.source.url()
}
pub fn source_user(&self) -> String {
self.source.api_user()
}
pub fn source_password(&self) -> String {
self.source.api_password()
}
}
impl Default for Config {
fn default() -> Config {
Config {
redis: RedisConfig::default(),
server: ServerConfig::default(),
source: SourceConfig::default(),
}
}
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct RedisConfig {
ip: String,
db: u64,
}
impl RedisConfig {
fn url(&self) -> String {
let pre = "redis://".to_string();
let my_ip = self.ip.to_string();
let my_db = self.db.to_string();
let my_url = pre + &my_ip + "/" + &my_db;
my_url
}
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct ServerConfig {
ip: String,
port: u64,
}
impl ServerConfig {
fn url(&self) -> String {
let my_ip = self.ip.to_string();
let my_port = self.port.to_string();
let my_url = my_ip + ":" + &my_port;
my_url
}
}
#[derive(RustcDecodable, RustcEncodable)]
pub struct SourceConfig {
api_url: String,
api_user: String,
api_password: String,
}
impl SourceConfig {
fn url(&self) -> String {
self.api_url.to_string()
}
fn api_user(&self) -> String {
self.api_user.to_string()
}
fn api_password(&self) -> String {
self.api_password.to_string()
}
}
impl Default for RedisConfig {
fn default() -> RedisConfig {
RedisConfig {
ip: "127.0.0.1".to_owned(),
db: 1,
}
}
}
impl Default for ServerConfig {
fn default() -> ServerConfig {
ServerConfig {
ip: "127.0.0.1".to_owned(),
port: 8080,
}
}
}
impl Default for SourceConfig {
fn default() -> SourceConfig {
SourceConfig {
api_url: "localhost:3000/api/v1/rating_summaries.json".to_owned(),
api_user: "kompass".to_owned(),
api_password: "secret".to_owned(),
}
}
}
pub fn load() -> Config {
let config: Config = ConfigFactory::load(Path::new("config.toml"));
config
}
|
use tui::Terminal;
use tui::backend::CrosstermBackend;
use std::io::Stdout;
use crate::runtime::data::launches::structures::{Launch, Rocket};
use tui::layout::{Layout, Direction, Constraint, Alignment};
use tui::widgets::{Clear, Block, Borders, Paragraph, Table, Row};
use tui::text::Text;
use crate::runtime::renderer::{centered_rect, render_help_menu};
use crate::runtime::state::State;
use crate::settings::Config;
pub mod dict;
pub fn run(
out: &mut Terminal<CrosstermBackend<Stdout>>,
launch_present: bool,
i: &Option<Launch>,
state: State,
_settings: &mut Config) {
if launch_present {
let launch = i.clone().unwrap();
let rocket = launch.rocket.unwrap_or(Rocket {
id: None,
configuration: None,
});
let vehicle = dict::match_rocket(rocket.id.unwrap_or(0));
if let Some(lv) = vehicle {
let _ = out.draw(|f| {
let size = f.size();
let chunks = Layout::default()
.direction(Direction::Horizontal)
.constraints([
Constraint::Percentage(33),
Constraint::Percentage(33),
Constraint::Percentage(33)
].as_ref())
.split(size);
let paragraph = Table::new(vec![
Row::new(vec!["", ""]),
Row::new(vec![" Name", &lv.name]),
Row::new(vec![" Manufacturer", &lv.manufacturer]),
Row::new(vec![" Country of Origin", &lv.country]),
Row::new(vec!["", ""]),
Row::new(vec![" Reusable", &lv.reusable]),
Row::new(vec![" ", &lv.country]),
])
.widths(&[
Constraint::Percentage(50),
Constraint::Percentage(50),
])
.block(Block::default().title(" Detailed Overview ").borders(Borders::ALL));
f.render_widget(paragraph, chunks[0]);
let paragraph = Table::new(vec![
Row::new(vec!["", ""]),
Row::new(vec![" Stages".to_string(), format!("{}", lv.stages.len())]),
Row::new(vec!["", ""]),
Row::new(vec![" First Stage", ""]),
Row::new(vec![" Known As", &lv.stages[0].name]),
Row::new(vec![" Engine Count", "9"]),
Row::new(vec![" Thrust (Sea Level)", &lv.stages[0].thrust_weight_sea]),
Row::new(vec![" Thrust (Vacuum)", &lv.stages[0].thrust_weight_vac]),
])
.widths(&[
Constraint::Percentage(50),
Constraint::Percentage(50),
])
.block(Block::default().title(" Launcher Overview ").borders(Borders::ALL));
f.render_widget(paragraph, chunks[1]);
let paragraph = Table::new(vec![
Row::new(vec!["", ""]),
Row::new(vec![" Name", &lv.name]),
Row::new(vec![" Manufacturer", &lv.manufacturer]),
Row::new(vec![" Country of Origin", &lv.country]),
Row::new(vec!["", ""]),
Row::new(vec![" Reusable", &lv.reusable]),
Row::new(vec![" ", &lv.country]),
])
.widths(&[
Constraint::Percentage(50),
Constraint::Percentage(50),
])
.block(Block::default().title(" Engine Overview ").borders(Borders::ALL));
f.render_widget(paragraph, chunks[2]);
});
} else {
let _ = out.draw(|f| {
let size = f.size();
let chunks = Layout::default()
.direction(Direction::Horizontal)
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
.split(size);
let paragraph = Paragraph::new(Text::raw(""))
.block(Block::default().title(" Detailed Overview ").borders(Borders::ALL))
.alignment(Alignment::Left);
f.render_widget(paragraph, chunks[0]);
let paragraph = Paragraph::new(Text::raw(""))
.block(Block::default().borders(Borders::ALL))
.alignment(Alignment::Left);
f.render_widget(paragraph, chunks[1]);
let error = Paragraph::new(Text::raw("\nThis launch vehicle does not currently have a deep dive view implemented.\nPlease check back in a future version for deep dive."))
.block(Block::default().title(" Error ").borders(Borders::ALL))
.alignment(Alignment::Center);
let area = centered_rect(60, 20, size);
f.render_widget(Clear, area); //this clears out the background
f.render_widget(error, area);
if state.render_help {
render_help_menu(f);
}
});
}
} else {
let _ = out.draw(|f| {
let size = f.size();
let chunks = Layout::default()
.direction(Direction::Horizontal)
.constraints([Constraint::Percentage(50), Constraint::Percentage(50)].as_ref())
.split(size);
let paragraph = Paragraph::new(Text::raw(""))
.block(Block::default().borders(Borders::ALL))
.alignment(Alignment::Left);
f.render_widget(paragraph, chunks[0]);
let paragraph = Paragraph::new(Text::raw(""))
.block(Block::default().title("Detailed Overview").borders(Borders::ALL))
.alignment(Alignment::Left);
f.render_widget(paragraph, chunks[1]);
let error = Paragraph::new(Text::raw("There is currently no launch available.\nCheck this screen again once one is available."))
.block(Block::default().title("Popup").borders(Borders::ALL))
.alignment(Alignment::Left);
let area = centered_rect(60, 20, size);
f.render_widget(Clear, area); //this clears out the background
f.render_widget(error, area);
if state.render_help {
render_help_menu(f);
}
});
}
}
|
use proptest::prelude::*;
use unicode_segmentation::*;
proptest! {
#[test]
fn frequencies(input in any::<String>()) {
let freqs = huffman_encoding::frequencies(input.as_str());
let graphemes = UnicodeSegmentation::graphemes(input.as_str(), true).collect::<Vec<&str>>();
// The sum of the frequencies of all the characters is equal to the
// length of the input.
assert_eq!(freqs.iter().fold(0, |acc, ch| acc + ch.1), graphemes.len());
let graphemes = graphemes.into_iter().collect::<::std::collections::HashSet::<&str>>();
// The cadinality of the frequencies vector is equal to that of the set
// of the characters of the input.
assert_eq!(freqs.len(), graphemes.len());
// All the elements of the set of the characters of the input
// are present in the frequencies vector.
graphemes.iter().for_each(|&g| assert!(freqs.iter().find(|x| x.0 == g).is_some()));
// The frequencies list is sorted in descending order.
(1..freqs.len()).for_each(|i| assert!(freqs[i].1 <= freqs[i-1].1))
}
#[test]
fn encode(input in any::<String>()) {
let (encoding, _encoded) = huffman_encoding::encode(input.as_str());
// All the characters in the input have an encoding.
UnicodeSegmentation::graphemes(input.as_str(), true)
.collect::<::std::collections::HashSet::<&str>>()
.iter()
.for_each(|&g| assert!(!encoding.get(g).unwrap().is_empty()));
// Kraft's inequality holds:
// https://en.wikipedia.org/wiki/Kraft%E2%80%93McMillan_inequality
let krafts_sum: f64 = encoding.values().fold(0.0, |acc, enc| acc + (1.0 / (1 << enc.len()) as f64));
match encoding.len() {
0 => {},
1 => assert!(krafts_sum == 0.5),
_ => assert!(krafts_sum == 1.0),
}
// The codes are instantaneously deocdable if no symbol is a prefix to
// another.
encoding.iter()
.for_each(|(k1, v1)| encoding.iter().for_each(|(k2, v2)| assert!(!v2.starts_with(v1) || k1 == k2)));
}
#[test]
fn e2e(input in any::<String>()) {
let (encoding, encoded) = huffman_encoding::encode(&input);
assert_eq!(huffman_encoding::decode(&encoding, &encoded).unwrap(), input);
}
}
|
use std::borrow::Borrow;
use std::path::PathBuf;
use std::process::Command;
use std::str;
use serde_json::Value;
#[derive(Debug)]
pub struct VideoFile {
pub path: String,
pub streams: Vec<CodecStream>,
}
#[derive(Debug)]
pub struct CodecStream {
pub codec_name: String,
pub codec_type: String,
pub tag_title: Option<String>,
pub index: i32,
}
// take a path and run it through ffprobe, if we get real looking json back from ffprobe
// we can assume it contains valid streams for now
pub fn ffprobe_file<'a>(path: PathBuf) -> Option<VideoFile> {
let path_str = path.to_str().unwrap();
let output = Command::new("ffprobe")
.args(&[
path_str,
"-show_streams",
"-v",
"quiet",
"-print_format",
"json",
])
.output()
.expect("failed to execute process");
if output.status.success() {
let output_string = str::from_utf8(&*output.stdout).unwrap();
let js: Value = serde_json::from_str(output_string).unwrap();
// simple validation
if !js.is_object() {
return None;
}
// this is optimistic, if we see anything unexpected we'll fail pretty badly
let streams = match js["streams"].borrow() {
Value::Array(objs) => {
objs.iter().map(|e| {
let tag_title = e.get("tags")
.map_or(None, |obj| obj.get("title"))
.map_or(None, |obj| Option::from(obj.to_string()));
CodecStream {
index: e["index"].as_i64().unwrap() as i32,
codec_name: e["codec_name"].as_str().unwrap().to_string(),
codec_type: e["codec_type"].as_str().unwrap().to_string(),
tag_title,
}
}).collect::<Vec<_>>()
}
_ => vec![]
};
// we only want valid video/audio containers
let video_streams = streams.iter().filter(|f| f.codec_type == "video").count();
let audio_streams = streams.iter().filter(|f| f.codec_type == "audio").count();
if video_streams == 0 || audio_streams == 0 { return None; }
return Some(VideoFile {
path: path_str.to_string(),
streams,
});
}
return None;
} |
#![allow(dead_code)]
use std::ascii;
use std::str;
use bstr::{ByteSlice, ByteVec};
pub fn nice_raw_bytes(bytes: &[u8]) -> String {
match str::from_utf8(bytes) {
Ok(s) => s.to_string(),
Err(_) => escape_bytes(bytes),
}
}
pub fn escape_bytes(bytes: &[u8]) -> String {
let escaped = bytes
.iter()
.flat_map(|&b| ascii::escape_default(b))
.collect::<Vec<u8>>();
String::from_utf8(escaped).unwrap()
}
pub fn hex_bytes(bytes: &[u8]) -> String {
bytes.iter().map(|&b| format!(r"\x{:02X}", b)).collect()
}
pub fn escape_default(s: &str) -> String {
s.chars().flat_map(|c| c.escape_default()).collect()
}
pub fn escape(bytes: &[u8]) -> String {
let mut escaped = String::new();
for (s, e, ch) in bytes.char_indices() {
if ch == '\u{FFFD}' {
for b in bytes[s..e].bytes() {
escape_byte(b, &mut escaped);
}
} else {
escape_char(ch, &mut escaped);
}
}
escaped
}
pub fn unescape<B: AsRef<[u8]>>(s: B) -> Vec<u8> {
#[derive(Clone, Copy, Eq, PartialEq)]
enum State {
/// The state after seeing a `\`.
Escape,
/// The state after seeing a `\x`.
HexFirst,
/// The state after seeing a `\x[0-9A-Fa-f]`.
HexSecond(char),
/// Default state.
Literal,
}
let mut bytes = vec![];
let mut state = State::Literal;
for c in s.as_ref().chars() {
match state {
State::Escape => match c {
'\\' => {
bytes.push(b'\\');
state = State::Literal;
}
'n' => {
bytes.push(b'\n');
state = State::Literal;
}
'r' => {
bytes.push(b'\r');
state = State::Literal;
}
't' => {
bytes.push(b'\t');
state = State::Literal;
}
'x' => {
state = State::HexFirst;
}
c => {
bytes.push_char('\\');
bytes.push_char(c);
state = State::Literal;
}
},
State::HexFirst => match c {
'0'..='9' | 'A'..='F' | 'a'..='f' => {
state = State::HexSecond(c);
}
c => {
bytes.push_char('\\');
bytes.push_char('x');
bytes.push_char(c);
state = State::Literal;
}
},
State::HexSecond(first) => match c {
'0'..='9' | 'A'..='F' | 'a'..='f' => {
let ordinal = format!("{}{}", first, c);
let byte = u8::from_str_radix(&ordinal, 16).unwrap();
bytes.push_byte(byte);
state = State::Literal;
}
c => {
bytes.push_char('\\');
bytes.push_char('x');
bytes.push_char(first);
bytes.push_char(c);
state = State::Literal;
}
},
State::Literal => match c {
'\\' => {
state = State::Escape;
}
c => {
bytes.push_char(c);
}
},
}
}
match state {
State::Escape => bytes.push_char('\\'),
State::HexFirst => bytes.push_str("\\x"),
State::HexSecond(c) => {
bytes.push_char('\\');
bytes.push_char('x');
bytes.push_char(c);
}
State::Literal => {}
}
bytes
}
/// Adds the given codepoint to the given string, escaping it if necessary.
fn escape_char(cp: char, into: &mut String) {
if cp.is_ascii() {
escape_byte(cp as u8, into);
} else {
into.push(cp);
}
}
/// Adds the given byte to the given string, escaping it if necessary.
fn escape_byte(byte: u8, into: &mut String) {
match byte {
0x21..=0x5B | 0x5D..=0x7D => into.push(byte as char),
b'\n' => into.push_str(r"\n"),
b'\r' => into.push_str(r"\r"),
b'\t' => into.push_str(r"\t"),
b'\\' => into.push_str(r"\\"),
_ => into.push_str(&format!(r"\x{:02X}", byte)),
}
}
#[cfg(test)]
mod tests {
use super::{escape, unescape};
fn b(bytes: &'static [u8]) -> Vec<u8> {
bytes.to_vec()
}
#[test]
fn empty() {
assert_eq!(b(b""), unescape(r""));
assert_eq!(r"", escape(b""));
}
#[test]
fn backslash() {
assert_eq!(b(b"\\"), unescape(r"\\"));
assert_eq!(r"\\", escape(b"\\"));
}
#[test]
fn nul() {
assert_eq!(b(b"\x00"), unescape(r"\x00"));
assert_eq!(r"\x00", escape(b"\x00"));
}
#[test]
fn nl() {
assert_eq!(b(b"\n"), unescape(r"\n"));
assert_eq!(r"\n", escape(b"\n"));
}
#[test]
fn tab() {
assert_eq!(b(b"\t"), unescape(r"\t"));
assert_eq!(r"\t", escape(b"\t"));
}
#[test]
fn carriage() {
assert_eq!(b(b"\r"), unescape(r"\r"));
assert_eq!(r"\r", escape(b"\r"));
}
#[test]
fn nothing_simple() {
assert_eq!(b(b"\\a"), unescape(r"\a"));
assert_eq!(b(b"\\a"), unescape(r"\\a"));
assert_eq!(r"\\a", escape(b"\\a"));
}
#[test]
fn nothing_hex0() {
assert_eq!(b(b"\\x"), unescape(r"\x"));
assert_eq!(b(b"\\x"), unescape(r"\\x"));
assert_eq!(r"\\x", escape(b"\\x"));
}
#[test]
fn nothing_hex1() {
assert_eq!(b(b"\\xz"), unescape(r"\xz"));
assert_eq!(b(b"\\xz"), unescape(r"\\xz"));
assert_eq!(r"\\xz", escape(b"\\xz"));
}
#[test]
fn nothing_hex2() {
assert_eq!(b(b"\\xzz"), unescape(r"\xzz"));
assert_eq!(b(b"\\xzz"), unescape(r"\\xzz"));
assert_eq!(r"\\xzz", escape(b"\\xzz"));
}
#[test]
fn invalid_utf8() {
assert_eq!(r"\xFF", escape(b"\xFF"));
assert_eq!(r"a\xFFb", escape(b"a\xFFb"));
}
#[test]
fn trailing_incomplete() {
assert_eq!(b(b"\\xA"), unescape(r"\xA"));
}
}
|
/*!
Redis Serialization Protocol相关的解析代码
*/
use std::io::{Read, Result};
use byteorder::ReadBytesExt;
use crate::to_string;
/// Redis Serialization Protocol解析
pub trait RespDecode: Read {
/// 读取并解析Redis响应
fn decode_resp(&mut self) -> Result<Resp> {
match self.decode_type()? {
Type::String => Ok(Resp::String(self.decode_string()?)),
Type::Int => self.decode_int(),
Type::Error => Ok(Resp::Error(self.decode_string()?)),
Type::BulkString => self.decode_bulk_string(),
Type::Array => self.decode_array(),
}
}
/// 读取解析Redis响应的类型
fn decode_type(&mut self) -> Result<Type> {
loop {
let b = self.read_u8()?;
if b == LF {
continue;
} else {
match b {
PLUS => return Ok(Type::String),
MINUS => return Ok(Type::Error),
COLON => return Ok(Type::Int),
DOLLAR => return Ok(Type::BulkString),
STAR => return Ok(Type::Array),
_ => panic!("Unexpected Data Type: {}", b),
}
}
}
}
/// 解析Simple String响应
fn decode_string(&mut self) -> Result<String> {
let mut buf = vec![];
loop {
let byte = self.read_u8()?;
if byte != CR {
buf.push(byte);
} else {
break;
}
}
if self.read_u8()? == LF {
Ok(to_string(buf))
} else {
panic!("Expect LF after CR");
}
}
/// 解析Integer响应
fn decode_int(&mut self) -> Result<Resp> {
let s = self.decode_string()?;
let i = s.parse::<i64>().unwrap();
return Ok(Resp::Int(i));
}
/// 解析Bulk String响应
fn decode_bulk_string(&mut self) -> Result<Resp> {
let r = self.decode_int()?;
if let Resp::Int(i) = r {
if i > 0 {
let mut buf = vec![0; i as usize];
self.read_exact(&mut buf)?;
let mut end = vec![0; 2];
self.read_exact(&mut end)?;
if !end.eq(&[CR, LF]) {
panic!("Expected CRLF");
} else {
return Ok(Resp::BulkBytes(buf));
}
} else {
self.read_exact(&mut [0; 2])?;
return Ok(Resp::BulkBytes(vec![0; 0]));
}
} else {
panic!("Expected Int Response");
}
}
/// 解析Array响应
fn decode_array(&mut self) -> Result<Resp> {
let r = self.decode_int()?;
if let Resp::Int(i) = r {
let mut arr = Vec::with_capacity(i as usize);
for _ in 0..i {
let resp = self.decode_resp()?;
arr.push(resp);
}
return Ok(Resp::Array(arr));
} else {
panic!("Expected Int Response");
}
}
}
impl<R: Read + ?Sized> RespDecode for R {}
pub enum Type {
String,
Error,
Int,
BulkString,
Array,
}
#[derive(Debug)]
pub enum Resp {
String(String),
Int(i64),
Error(String),
BulkBytes(Vec<u8>),
Array(Vec<Resp>),
}
// 回车换行,在redis响应中一般表示终结符,或用作分隔符以分隔数据
pub(crate) const CR: u8 = b'\r';
pub(crate) const LF: u8 = b'\n';
// 代表array响应
pub(crate) const STAR: u8 = b'*';
// 代表bulk string响应
pub(crate) const DOLLAR: u8 = b'$';
// 代表simple string响应
pub(crate) const PLUS: u8 = b'+';
// 代表error响应
pub(crate) const MINUS: u8 = b'-';
// 代表integer响应
pub(crate) const COLON: u8 = b':';
#[cfg(test)]
mod test {
use crate::resp::{Resp, RespDecode};
use std::io::Cursor;
#[test]
fn test_decode_array() {
let b = b"*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n";
let mut cursor = Cursor::new(b);
let r = cursor.decode_resp();
match r {
Ok(resp) => match resp {
Resp::Array(arr) => {
let mut data = Vec::new();
for x in arr {
match x {
Resp::BulkBytes(bytes) => data.push(bytes),
_ => panic!("wrong type"),
}
}
assert!(b"SELECT".eq(data.get(0).unwrap().as_slice()));
assert!(b"0".eq(data.get(1).unwrap().as_slice()));
}
_ => panic!("wrong type"),
},
Err(err) => panic!(err),
}
}
}
|
#![allow(unused_variables, non_upper_case_globals, non_snake_case, unused_unsafe, non_camel_case_types, dead_code, clippy::all)]
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWMFLIP3DWINDOWPOLICY(pub i32);
pub const DWMFLIP3D_DEFAULT: DWMFLIP3DWINDOWPOLICY = DWMFLIP3DWINDOWPOLICY(0i32);
pub const DWMFLIP3D_EXCLUDEBELOW: DWMFLIP3DWINDOWPOLICY = DWMFLIP3DWINDOWPOLICY(1i32);
pub const DWMFLIP3D_EXCLUDEABOVE: DWMFLIP3DWINDOWPOLICY = DWMFLIP3DWINDOWPOLICY(2i32);
pub const DWMFLIP3D_LAST: DWMFLIP3DWINDOWPOLICY = DWMFLIP3DWINDOWPOLICY(3i32);
impl ::core::convert::From<i32> for DWMFLIP3DWINDOWPOLICY {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWMFLIP3DWINDOWPOLICY {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWMNCRENDERINGPOLICY(pub i32);
pub const DWMNCRP_USEWINDOWSTYLE: DWMNCRENDERINGPOLICY = DWMNCRENDERINGPOLICY(0i32);
pub const DWMNCRP_DISABLED: DWMNCRENDERINGPOLICY = DWMNCRENDERINGPOLICY(1i32);
pub const DWMNCRP_ENABLED: DWMNCRENDERINGPOLICY = DWMNCRENDERINGPOLICY(2i32);
pub const DWMNCRP_LAST: DWMNCRENDERINGPOLICY = DWMNCRENDERINGPOLICY(3i32);
impl ::core::convert::From<i32> for DWMNCRENDERINGPOLICY {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWMNCRENDERINGPOLICY {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWMTRANSITION_OWNEDWINDOW_TARGET(pub i32);
pub const DWMTRANSITION_OWNEDWINDOW_NULL: DWMTRANSITION_OWNEDWINDOW_TARGET = DWMTRANSITION_OWNEDWINDOW_TARGET(-1i32);
pub const DWMTRANSITION_OWNEDWINDOW_REPOSITION: DWMTRANSITION_OWNEDWINDOW_TARGET = DWMTRANSITION_OWNEDWINDOW_TARGET(0i32);
impl ::core::convert::From<i32> for DWMTRANSITION_OWNEDWINDOW_TARGET {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWMTRANSITION_OWNEDWINDOW_TARGET {
type Abi = Self;
}
pub const DWMWA_COLOR_DEFAULT: u32 = 4294967295u32;
pub const DWMWA_COLOR_NONE: u32 = 4294967294u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWMWINDOWATTRIBUTE(pub i32);
pub const DWMWA_NCRENDERING_ENABLED: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(1i32);
pub const DWMWA_NCRENDERING_POLICY: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(2i32);
pub const DWMWA_TRANSITIONS_FORCEDISABLED: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(3i32);
pub const DWMWA_ALLOW_NCPAINT: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(4i32);
pub const DWMWA_CAPTION_BUTTON_BOUNDS: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(5i32);
pub const DWMWA_NONCLIENT_RTL_LAYOUT: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(6i32);
pub const DWMWA_FORCE_ICONIC_REPRESENTATION: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(7i32);
pub const DWMWA_FLIP3D_POLICY: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(8i32);
pub const DWMWA_EXTENDED_FRAME_BOUNDS: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(9i32);
pub const DWMWA_HAS_ICONIC_BITMAP: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(10i32);
pub const DWMWA_DISALLOW_PEEK: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(11i32);
pub const DWMWA_EXCLUDED_FROM_PEEK: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(12i32);
pub const DWMWA_CLOAK: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(13i32);
pub const DWMWA_CLOAKED: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(14i32);
pub const DWMWA_FREEZE_REPRESENTATION: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(15i32);
pub const DWMWA_PASSIVE_UPDATE_MODE: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(16i32);
pub const DWMWA_USE_HOSTBACKDROPBRUSH: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(17i32);
pub const DWMWA_USE_IMMERSIVE_DARK_MODE: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(20i32);
pub const DWMWA_WINDOW_CORNER_PREFERENCE: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(33i32);
pub const DWMWA_BORDER_COLOR: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(34i32);
pub const DWMWA_CAPTION_COLOR: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(35i32);
pub const DWMWA_TEXT_COLOR: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(36i32);
pub const DWMWA_VISIBLE_FRAME_BORDER_THICKNESS: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(37i32);
pub const DWMWA_LAST: DWMWINDOWATTRIBUTE = DWMWINDOWATTRIBUTE(38i32);
impl ::core::convert::From<i32> for DWMWINDOWATTRIBUTE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWMWINDOWATTRIBUTE {
type Abi = Self;
}
pub const DWM_BB_BLURREGION: u32 = 2u32;
pub const DWM_BB_ENABLE: u32 = 1u32;
pub const DWM_BB_TRANSITIONONMAXIMIZED: u32 = 4u32;
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
pub struct DWM_BLURBEHIND {
pub dwFlags: u32,
pub fEnable: super::super::Foundation::BOOL,
pub hRgnBlur: super::Gdi::HRGN,
pub fTransitionOnMaximized: super::super::Foundation::BOOL,
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl DWM_BLURBEHIND {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl ::core::default::Default for DWM_BLURBEHIND {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl ::core::cmp::PartialEq for DWM_BLURBEHIND {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
impl ::core::cmp::Eq for DWM_BLURBEHIND {}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
unsafe impl ::windows::core::Abi for DWM_BLURBEHIND {
type Abi = Self;
}
pub const DWM_CLOAKED_APP: u32 = 1u32;
pub const DWM_CLOAKED_INHERITED: u32 = 4u32;
pub const DWM_CLOAKED_SHELL: u32 = 2u32;
pub const DWM_EC_DISABLECOMPOSITION: u32 = 0u32;
pub const DWM_EC_ENABLECOMPOSITION: u32 = 1u32;
pub const DWM_FRAME_DURATION_DEFAULT: i32 = -1i32;
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
#[cfg(feature = "Win32_Foundation")]
pub struct DWM_PRESENT_PARAMETERS {
pub cbSize: u32,
pub fQueue: super::super::Foundation::BOOL,
pub cRefreshStart: u64,
pub cBuffer: u32,
pub fUseSourceRate: super::super::Foundation::BOOL,
pub rateSource: UNSIGNED_RATIO,
pub cRefreshesPerFrame: u32,
pub eSampling: DWM_SOURCE_FRAME_SAMPLING,
}
#[cfg(feature = "Win32_Foundation")]
impl DWM_PRESENT_PARAMETERS {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::default::Default for DWM_PRESENT_PARAMETERS {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::PartialEq for DWM_PRESENT_PARAMETERS {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::Eq for DWM_PRESENT_PARAMETERS {}
#[cfg(feature = "Win32_Foundation")]
unsafe impl ::windows::core::Abi for DWM_PRESENT_PARAMETERS {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWM_SHOWCONTACT(pub u32);
pub const DWMSC_DOWN: DWM_SHOWCONTACT = DWM_SHOWCONTACT(1u32);
pub const DWMSC_UP: DWM_SHOWCONTACT = DWM_SHOWCONTACT(2u32);
pub const DWMSC_DRAG: DWM_SHOWCONTACT = DWM_SHOWCONTACT(4u32);
pub const DWMSC_HOLD: DWM_SHOWCONTACT = DWM_SHOWCONTACT(8u32);
pub const DWMSC_PENBARREL: DWM_SHOWCONTACT = DWM_SHOWCONTACT(16u32);
pub const DWMSC_NONE: DWM_SHOWCONTACT = DWM_SHOWCONTACT(0u32);
pub const DWMSC_ALL: DWM_SHOWCONTACT = DWM_SHOWCONTACT(4294967295u32);
impl ::core::convert::From<u32> for DWM_SHOWCONTACT {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWM_SHOWCONTACT {
type Abi = Self;
}
impl ::core::ops::BitOr for DWM_SHOWCONTACT {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::core::ops::BitAnd for DWM_SHOWCONTACT {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::core::ops::BitOrAssign for DWM_SHOWCONTACT {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::core::ops::BitAndAssign for DWM_SHOWCONTACT {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::core::ops::Not for DWM_SHOWCONTACT {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
pub const DWM_SIT_DISPLAYFRAME: u32 = 1u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWM_SOURCE_FRAME_SAMPLING(pub i32);
pub const DWM_SOURCE_FRAME_SAMPLING_POINT: DWM_SOURCE_FRAME_SAMPLING = DWM_SOURCE_FRAME_SAMPLING(0i32);
pub const DWM_SOURCE_FRAME_SAMPLING_COVERAGE: DWM_SOURCE_FRAME_SAMPLING = DWM_SOURCE_FRAME_SAMPLING(1i32);
pub const DWM_SOURCE_FRAME_SAMPLING_LAST: DWM_SOURCE_FRAME_SAMPLING = DWM_SOURCE_FRAME_SAMPLING(2i32);
impl ::core::convert::From<i32> for DWM_SOURCE_FRAME_SAMPLING {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWM_SOURCE_FRAME_SAMPLING {
type Abi = Self;
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWM_TAB_WINDOW_REQUIREMENTS(pub u32);
pub const DWMTWR_NONE: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(0u32);
pub const DWMTWR_IMPLEMENTED_BY_SYSTEM: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(1u32);
pub const DWMTWR_WINDOW_RELATIONSHIP: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(2u32);
pub const DWMTWR_WINDOW_STYLES: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(4u32);
pub const DWMTWR_WINDOW_REGION: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(8u32);
pub const DWMTWR_WINDOW_DWM_ATTRIBUTES: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(16u32);
pub const DWMTWR_WINDOW_MARGINS: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(32u32);
pub const DWMTWR_TABBING_ENABLED: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(64u32);
pub const DWMTWR_USER_POLICY: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(128u32);
pub const DWMTWR_GROUP_POLICY: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(256u32);
pub const DWMTWR_APP_COMPAT: DWM_TAB_WINDOW_REQUIREMENTS = DWM_TAB_WINDOW_REQUIREMENTS(512u32);
impl ::core::convert::From<u32> for DWM_TAB_WINDOW_REQUIREMENTS {
fn from(value: u32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWM_TAB_WINDOW_REQUIREMENTS {
type Abi = Self;
}
impl ::core::ops::BitOr for DWM_TAB_WINDOW_REQUIREMENTS {
type Output = Self;
fn bitor(self, rhs: Self) -> Self {
Self(self.0 | rhs.0)
}
}
impl ::core::ops::BitAnd for DWM_TAB_WINDOW_REQUIREMENTS {
type Output = Self;
fn bitand(self, rhs: Self) -> Self {
Self(self.0 & rhs.0)
}
}
impl ::core::ops::BitOrAssign for DWM_TAB_WINDOW_REQUIREMENTS {
fn bitor_assign(&mut self, rhs: Self) {
self.0.bitor_assign(rhs.0)
}
}
impl ::core::ops::BitAndAssign for DWM_TAB_WINDOW_REQUIREMENTS {
fn bitand_assign(&mut self, rhs: Self) {
self.0.bitand_assign(rhs.0)
}
}
impl ::core::ops::Not for DWM_TAB_WINDOW_REQUIREMENTS {
type Output = Self;
fn not(self) -> Self {
Self(self.0.not())
}
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
#[cfg(feature = "Win32_Foundation")]
pub struct DWM_THUMBNAIL_PROPERTIES {
pub dwFlags: u32,
pub rcDestination: super::super::Foundation::RECT,
pub rcSource: super::super::Foundation::RECT,
pub opacity: u8,
pub fVisible: super::super::Foundation::BOOL,
pub fSourceClientAreaOnly: super::super::Foundation::BOOL,
}
#[cfg(feature = "Win32_Foundation")]
impl DWM_THUMBNAIL_PROPERTIES {}
#[cfg(feature = "Win32_Foundation")]
impl ::core::default::Default for DWM_THUMBNAIL_PROPERTIES {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::PartialEq for DWM_THUMBNAIL_PROPERTIES {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
#[cfg(feature = "Win32_Foundation")]
impl ::core::cmp::Eq for DWM_THUMBNAIL_PROPERTIES {}
#[cfg(feature = "Win32_Foundation")]
unsafe impl ::windows::core::Abi for DWM_THUMBNAIL_PROPERTIES {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
pub struct DWM_TIMING_INFO {
pub cbSize: u32,
pub rateRefresh: UNSIGNED_RATIO,
pub qpcRefreshPeriod: u64,
pub rateCompose: UNSIGNED_RATIO,
pub qpcVBlank: u64,
pub cRefresh: u64,
pub cDXRefresh: u32,
pub qpcCompose: u64,
pub cFrame: u64,
pub cDXPresent: u32,
pub cRefreshFrame: u64,
pub cFrameSubmitted: u64,
pub cDXPresentSubmitted: u32,
pub cFrameConfirmed: u64,
pub cDXPresentConfirmed: u32,
pub cRefreshConfirmed: u64,
pub cDXRefreshConfirmed: u32,
pub cFramesLate: u64,
pub cFramesOutstanding: u32,
pub cFrameDisplayed: u64,
pub qpcFrameDisplayed: u64,
pub cRefreshFrameDisplayed: u64,
pub cFrameComplete: u64,
pub qpcFrameComplete: u64,
pub cFramePending: u64,
pub qpcFramePending: u64,
pub cFramesDisplayed: u64,
pub cFramesComplete: u64,
pub cFramesPending: u64,
pub cFramesAvailable: u64,
pub cFramesDropped: u64,
pub cFramesMissed: u64,
pub cRefreshNextDisplayed: u64,
pub cRefreshNextPresented: u64,
pub cRefreshesDisplayed: u64,
pub cRefreshesPresented: u64,
pub cRefreshStarted: u64,
pub cPixelsReceived: u64,
pub cPixelsDrawn: u64,
pub cBuffersEmpty: u64,
}
impl DWM_TIMING_INFO {}
impl ::core::default::Default for DWM_TIMING_INFO {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::cmp::PartialEq for DWM_TIMING_INFO {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
impl ::core::cmp::Eq for DWM_TIMING_INFO {}
unsafe impl ::windows::core::Abi for DWM_TIMING_INFO {
type Abi = Self;
}
pub const DWM_TNP_OPACITY: u32 = 4u32;
pub const DWM_TNP_RECTDESTINATION: u32 = 1u32;
pub const DWM_TNP_RECTSOURCE: u32 = 2u32;
pub const DWM_TNP_SOURCECLIENTAREAONLY: u32 = 16u32;
pub const DWM_TNP_VISIBLE: u32 = 8u32;
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct DWM_WINDOW_CORNER_PREFERENCE(pub i32);
pub const DWMWCP_DEFAULT: DWM_WINDOW_CORNER_PREFERENCE = DWM_WINDOW_CORNER_PREFERENCE(0i32);
pub const DWMWCP_DONOTROUND: DWM_WINDOW_CORNER_PREFERENCE = DWM_WINDOW_CORNER_PREFERENCE(1i32);
pub const DWMWCP_ROUND: DWM_WINDOW_CORNER_PREFERENCE = DWM_WINDOW_CORNER_PREFERENCE(2i32);
pub const DWMWCP_ROUNDSMALL: DWM_WINDOW_CORNER_PREFERENCE = DWM_WINDOW_CORNER_PREFERENCE(3i32);
impl ::core::convert::From<i32> for DWM_WINDOW_CORNER_PREFERENCE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for DWM_WINDOW_CORNER_PREFERENCE {
type Abi = Self;
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmAttachMilContent<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmAttachMilContent(hwnd: super::super::Foundation::HWND) -> ::windows::core::HRESULT;
}
DwmAttachMilContent(hwnd.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmDefWindowProc<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::WPARAM>, Param3: ::windows::core::IntoParam<'a, super::super::Foundation::LPARAM>>(hwnd: Param0, msg: u32, wparam: Param2, lparam: Param3, plresult: *mut super::super::Foundation::LRESULT) -> super::super::Foundation::BOOL {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmDefWindowProc(hwnd: super::super::Foundation::HWND, msg: u32, wparam: super::super::Foundation::WPARAM, lparam: super::super::Foundation::LPARAM, plresult: *mut super::super::Foundation::LRESULT) -> super::super::Foundation::BOOL;
}
::core::mem::transmute(DwmDefWindowProc(hwnd.into_param().abi(), ::core::mem::transmute(msg), wparam.into_param().abi(), lparam.into_param().abi(), ::core::mem::transmute(plresult)))
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmDetachMilContent<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmDetachMilContent(hwnd: super::super::Foundation::HWND) -> ::windows::core::HRESULT;
}
DwmDetachMilContent(hwnd.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
#[inline]
pub unsafe fn DwmEnableBlurBehindWindow<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, pblurbehind: *const DWM_BLURBEHIND) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmEnableBlurBehindWindow(hwnd: super::super::Foundation::HWND, pblurbehind: *const DWM_BLURBEHIND) -> ::windows::core::HRESULT;
}
DwmEnableBlurBehindWindow(hwnd.into_param().abi(), ::core::mem::transmute(pblurbehind)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmEnableComposition(ucompositionaction: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmEnableComposition(ucompositionaction: u32) -> ::windows::core::HRESULT;
}
DwmEnableComposition(::core::mem::transmute(ucompositionaction)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmEnableMMCSS<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(fenablemmcss: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmEnableMMCSS(fenablemmcss: super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
DwmEnableMMCSS(fenablemmcss.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))]
#[inline]
pub unsafe fn DwmExtendFrameIntoClientArea<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, pmarinset: *const super::super::UI::Controls::MARGINS) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmExtendFrameIntoClientArea(hwnd: super::super::Foundation::HWND, pmarinset: *const super::super::UI::Controls::MARGINS) -> ::windows::core::HRESULT;
}
DwmExtendFrameIntoClientArea(hwnd.into_param().abi(), ::core::mem::transmute(pmarinset)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmFlush() -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmFlush() -> ::windows::core::HRESULT;
}
DwmFlush().ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmGetColorizationColor(pcrcolorization: *mut u32, pfopaqueblend: *mut super::super::Foundation::BOOL) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetColorizationColor(pcrcolorization: *mut u32, pfopaqueblend: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
DwmGetColorizationColor(::core::mem::transmute(pcrcolorization), ::core::mem::transmute(pfopaqueblend)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmGetCompositionTimingInfo<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> ::windows::core::Result<DWM_TIMING_INFO> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetCompositionTimingInfo(hwnd: super::super::Foundation::HWND, ptiminginfo: *mut DWM_TIMING_INFO) -> ::windows::core::HRESULT;
}
let mut result__: <DWM_TIMING_INFO as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmGetCompositionTimingInfo(hwnd.into_param().abi(), &mut result__).from_abi::<DWM_TIMING_INFO>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmGetGraphicsStreamClient(uindex: u32) -> ::windows::core::Result<::windows::core::GUID> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetGraphicsStreamClient(uindex: u32, pclientuuid: *mut ::windows::core::GUID) -> ::windows::core::HRESULT;
}
let mut result__: <::windows::core::GUID as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmGetGraphicsStreamClient(::core::mem::transmute(uindex), &mut result__).from_abi::<::windows::core::GUID>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmGetGraphicsStreamTransformHint(uindex: u32) -> ::windows::core::Result<MilMatrix3x2D> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetGraphicsStreamTransformHint(uindex: u32, ptransform: *mut MilMatrix3x2D) -> ::windows::core::HRESULT;
}
let mut result__: <MilMatrix3x2D as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmGetGraphicsStreamTransformHint(::core::mem::transmute(uindex), &mut result__).from_abi::<MilMatrix3x2D>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmGetTransportAttributes(pfisremoting: *mut super::super::Foundation::BOOL, pfisconnected: *mut super::super::Foundation::BOOL, pdwgeneration: *mut u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetTransportAttributes(pfisremoting: *mut super::super::Foundation::BOOL, pfisconnected: *mut super::super::Foundation::BOOL, pdwgeneration: *mut u32) -> ::windows::core::HRESULT;
}
DwmGetTransportAttributes(::core::mem::transmute(pfisremoting), ::core::mem::transmute(pfisconnected), ::core::mem::transmute(pdwgeneration)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmGetUnmetTabRequirements<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(appwindow: Param0) -> ::windows::core::Result<DWM_TAB_WINDOW_REQUIREMENTS> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetUnmetTabRequirements(appwindow: super::super::Foundation::HWND, value: *mut DWM_TAB_WINDOW_REQUIREMENTS) -> ::windows::core::HRESULT;
}
let mut result__: <DWM_TAB_WINDOW_REQUIREMENTS as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmGetUnmetTabRequirements(appwindow.into_param().abi(), &mut result__).from_abi::<DWM_TAB_WINDOW_REQUIREMENTS>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmGetWindowAttribute<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *mut ::core::ffi::c_void, cbattribute: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmGetWindowAttribute(hwnd: super::super::Foundation::HWND, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *mut ::core::ffi::c_void, cbattribute: u32) -> ::windows::core::HRESULT;
}
DwmGetWindowAttribute(hwnd.into_param().abi(), ::core::mem::transmute(dwattribute), ::core::mem::transmute(pvattribute), ::core::mem::transmute(cbattribute)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmInvalidateIconicBitmaps<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmInvalidateIconicBitmaps(hwnd: super::super::Foundation::HWND) -> ::windows::core::HRESULT;
}
DwmInvalidateIconicBitmaps(hwnd.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmIsCompositionEnabled() -> ::windows::core::Result<super::super::Foundation::BOOL> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmIsCompositionEnabled(pfenabled: *mut super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::Foundation::BOOL as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmIsCompositionEnabled(&mut result__).from_abi::<super::super::Foundation::BOOL>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmModifyPreviousDxFrameDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>>(hwnd: Param0, crefreshes: i32, frelative: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmModifyPreviousDxFrameDuration(hwnd: super::super::Foundation::HWND, crefreshes: i32, frelative: super::super::Foundation::BOOL) -> ::windows::core::HRESULT;
}
DwmModifyPreviousDxFrameDuration(hwnd.into_param().abi(), ::core::mem::transmute(crefreshes), frelative.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmQueryThumbnailSourceSize(hthumbnail: isize) -> ::windows::core::Result<super::super::Foundation::SIZE> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmQueryThumbnailSourceSize(hthumbnail: isize, psize: *mut super::super::Foundation::SIZE) -> ::windows::core::HRESULT;
}
let mut result__: <super::super::Foundation::SIZE as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmQueryThumbnailSourceSize(::core::mem::transmute(hthumbnail), &mut result__).from_abi::<super::super::Foundation::SIZE>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmRegisterThumbnail<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnddestination: Param0, hwndsource: Param1) -> ::windows::core::Result<isize> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmRegisterThumbnail(hwnddestination: super::super::Foundation::HWND, hwndsource: super::super::Foundation::HWND, phthumbnailid: *mut isize) -> ::windows::core::HRESULT;
}
let mut result__: <isize as ::windows::core::Abi>::Abi = ::core::mem::zeroed();
DwmRegisterThumbnail(hwnddestination.into_param().abi(), hwndsource.into_param().abi(), &mut result__).from_abi::<isize>(result__)
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmRenderGesture(gt: GESTURE_TYPE, ccontacts: u32, pdwpointerid: *const u32, ppoints: *const super::super::Foundation::POINT) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmRenderGesture(gt: GESTURE_TYPE, ccontacts: u32, pdwpointerid: *const u32, ppoints: *const super::super::Foundation::POINT) -> ::windows::core::HRESULT;
}
DwmRenderGesture(::core::mem::transmute(gt), ::core::mem::transmute(ccontacts), ::core::mem::transmute(pdwpointerid), ::core::mem::transmute(ppoints)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmSetDxFrameDuration<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, crefreshes: i32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmSetDxFrameDuration(hwnd: super::super::Foundation::HWND, crefreshes: i32) -> ::windows::core::HRESULT;
}
DwmSetDxFrameDuration(hwnd.into_param().abi(), ::core::mem::transmute(crefreshes)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
#[inline]
pub unsafe fn DwmSetIconicLivePreviewBitmap<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::Gdi::HBITMAP>>(hwnd: Param0, hbmp: Param1, pptclient: *const super::super::Foundation::POINT, dwsitflags: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmSetIconicLivePreviewBitmap(hwnd: super::super::Foundation::HWND, hbmp: super::Gdi::HBITMAP, pptclient: *const super::super::Foundation::POINT, dwsitflags: u32) -> ::windows::core::HRESULT;
}
DwmSetIconicLivePreviewBitmap(hwnd.into_param().abi(), hbmp.into_param().abi(), ::core::mem::transmute(pptclient), ::core::mem::transmute(dwsitflags)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))]
#[inline]
pub unsafe fn DwmSetIconicThumbnail<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>, Param1: ::windows::core::IntoParam<'a, super::Gdi::HBITMAP>>(hwnd: Param0, hbmp: Param1, dwsitflags: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmSetIconicThumbnail(hwnd: super::super::Foundation::HWND, hbmp: super::Gdi::HBITMAP, dwsitflags: u32) -> ::windows::core::HRESULT;
}
DwmSetIconicThumbnail(hwnd.into_param().abi(), hbmp.into_param().abi(), ::core::mem::transmute(dwsitflags)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmSetPresentParameters<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, ppresentparams: *mut DWM_PRESENT_PARAMETERS) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmSetPresentParameters(hwnd: super::super::Foundation::HWND, ppresentparams: *mut DWM_PRESENT_PARAMETERS) -> ::windows::core::HRESULT;
}
DwmSetPresentParameters(hwnd.into_param().abi(), ::core::mem::transmute(ppresentparams)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmSetWindowAttribute<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *const ::core::ffi::c_void, cbattribute: u32) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmSetWindowAttribute(hwnd: super::super::Foundation::HWND, dwattribute: DWMWINDOWATTRIBUTE, pvattribute: *const ::core::ffi::c_void, cbattribute: u32) -> ::windows::core::HRESULT;
}
DwmSetWindowAttribute(hwnd.into_param().abi(), ::core::mem::transmute(dwattribute), ::core::mem::transmute(pvattribute), ::core::mem::transmute(cbattribute)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmShowContact(dwpointerid: u32, eshowcontact: DWM_SHOWCONTACT) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmShowContact(dwpointerid: u32, eshowcontact: DWM_SHOWCONTACT) -> ::windows::core::HRESULT;
}
DwmShowContact(::core::mem::transmute(dwpointerid), ::core::mem::transmute(eshowcontact)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmTetherContact<'a, Param1: ::windows::core::IntoParam<'a, super::super::Foundation::BOOL>, Param2: ::windows::core::IntoParam<'a, super::super::Foundation::POINT>>(dwpointerid: u32, fenable: Param1, pttether: Param2) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmTetherContact(dwpointerid: u32, fenable: super::super::Foundation::BOOL, pttether: super::super::Foundation::POINT) -> ::windows::core::HRESULT;
}
DwmTetherContact(::core::mem::transmute(dwpointerid), fenable.into_param().abi(), pttether.into_param().abi()).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmTransitionOwnedWindow<'a, Param0: ::windows::core::IntoParam<'a, super::super::Foundation::HWND>>(hwnd: Param0, target: DWMTRANSITION_OWNEDWINDOW_TARGET) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmTransitionOwnedWindow(hwnd: super::super::Foundation::HWND, target: DWMTRANSITION_OWNEDWINDOW_TARGET) -> ::windows::core::HRESULT;
}
DwmTransitionOwnedWindow(hwnd.into_param().abi(), ::core::mem::transmute(target)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[inline]
pub unsafe fn DwmUnregisterThumbnail(hthumbnailid: isize) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmUnregisterThumbnail(hthumbnailid: isize) -> ::windows::core::HRESULT;
}
DwmUnregisterThumbnail(::core::mem::transmute(hthumbnailid)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[cfg(feature = "Win32_Foundation")]
#[inline]
pub unsafe fn DwmUpdateThumbnailProperties(hthumbnailid: isize, ptnproperties: *const DWM_THUMBNAIL_PROPERTIES) -> ::windows::core::Result<()> {
#[cfg(windows)]
{
#[link(name = "windows")]
extern "system" {
fn DwmUpdateThumbnailProperties(hthumbnailid: isize, ptnproperties: *const DWM_THUMBNAIL_PROPERTIES) -> ::windows::core::HRESULT;
}
DwmUpdateThumbnailProperties(::core::mem::transmute(hthumbnailid), ::core::mem::transmute(ptnproperties)).ok()
}
#[cfg(not(windows))]
unimplemented!("Unsupported target OS");
}
#[derive(:: core :: cmp :: PartialEq, :: core :: cmp :: Eq, :: core :: marker :: Copy, :: core :: clone :: Clone, :: core :: default :: Default, :: core :: fmt :: Debug)]
#[repr(transparent)]
pub struct GESTURE_TYPE(pub i32);
pub const GT_PEN_TAP: GESTURE_TYPE = GESTURE_TYPE(0i32);
pub const GT_PEN_DOUBLETAP: GESTURE_TYPE = GESTURE_TYPE(1i32);
pub const GT_PEN_RIGHTTAP: GESTURE_TYPE = GESTURE_TYPE(2i32);
pub const GT_PEN_PRESSANDHOLD: GESTURE_TYPE = GESTURE_TYPE(3i32);
pub const GT_PEN_PRESSANDHOLDABORT: GESTURE_TYPE = GESTURE_TYPE(4i32);
pub const GT_TOUCH_TAP: GESTURE_TYPE = GESTURE_TYPE(5i32);
pub const GT_TOUCH_DOUBLETAP: GESTURE_TYPE = GESTURE_TYPE(6i32);
pub const GT_TOUCH_RIGHTTAP: GESTURE_TYPE = GESTURE_TYPE(7i32);
pub const GT_TOUCH_PRESSANDHOLD: GESTURE_TYPE = GESTURE_TYPE(8i32);
pub const GT_TOUCH_PRESSANDHOLDABORT: GESTURE_TYPE = GESTURE_TYPE(9i32);
pub const GT_TOUCH_PRESSANDTAP: GESTURE_TYPE = GESTURE_TYPE(10i32);
impl ::core::convert::From<i32> for GESTURE_TYPE {
fn from(value: i32) -> Self {
Self(value)
}
}
unsafe impl ::windows::core::Abi for GESTURE_TYPE {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
pub struct MilMatrix3x2D {
pub S_11: f64,
pub S_12: f64,
pub S_21: f64,
pub S_22: f64,
pub DX: f64,
pub DY: f64,
}
impl MilMatrix3x2D {}
impl ::core::default::Default for MilMatrix3x2D {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::cmp::PartialEq for MilMatrix3x2D {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
impl ::core::cmp::Eq for MilMatrix3x2D {}
unsafe impl ::windows::core::Abi for MilMatrix3x2D {
type Abi = Self;
}
#[derive(:: core :: clone :: Clone, :: core :: marker :: Copy)]
#[repr(C, packed(1))]
pub struct UNSIGNED_RATIO {
pub uiNumerator: u32,
pub uiDenominator: u32,
}
impl UNSIGNED_RATIO {}
impl ::core::default::Default for UNSIGNED_RATIO {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ::core::cmp::PartialEq for UNSIGNED_RATIO {
fn eq(&self, _other: &Self) -> bool {
unimplemented!()
}
}
impl ::core::cmp::Eq for UNSIGNED_RATIO {}
unsafe impl ::windows::core::Abi for UNSIGNED_RATIO {
type Abi = Self;
}
pub const c_DwmMaxAdapters: u32 = 16u32;
pub const c_DwmMaxMonitors: u32 = 16u32;
pub const c_DwmMaxQueuedBuffers: u32 = 8u32;
|
use std::fmt;
use std::sync::Arc;
use std::sync::Mutex;
use std::time::Duration;
use backend::*;
use output_log::*;
use output_state::*;
#[ derive (Clone) ]
pub struct Output {
state: Arc <Mutex <OutputState>>,
prefix: String,
notice: bool,
debug: bool,
}
impl Output {
#[ inline ]
pub fn new (
backend: Option <Box <Backend>>,
) -> Output {
Output {
state: OutputState::new (
backend,
Duration::from_millis (100)),
prefix: "".to_string (),
notice: true,
debug: false,
}
}
#[ inline ]
pub fn new_with_options (
backend: Option <Box <Backend>>,
prefix: String,
notice: bool,
debug: bool,
) -> Output {
Output {
state: OutputState::new (
backend,
Duration::from_millis (100)),
prefix: prefix,
notice: notice,
debug: debug,
}
}
#[ inline ]
pub fn disable_notices (
& self,
) -> Output {
Output {
state: self.state.clone (),
prefix: self.prefix.clone (),
notice: false,
debug: false,
}
}
#[ inline ]
pub fn enable_notices (
& self,
) -> Output {
Output {
state: self.state.clone (),
prefix: self.prefix.clone (),
notice: true,
debug: false,
}
}
#[ inline ]
pub fn enable_debug (
& self,
) -> Output {
Output {
state: self.state.clone (),
prefix: self.prefix.clone (),
notice: true,
debug: true,
}
}
#[ inline ]
pub fn prefix (
& self,
prefix: String,
) -> Output {
Output {
state: self.state.clone (),
prefix: format! (
"{}{}",
self.prefix,
prefix),
notice: true,
debug: true,
}
}
#[ inline ]
pub fn message_format (
& self,
arguments: fmt::Arguments,
) {
self.add_log (
format! (
"{}{}",
self.prefix,
arguments),
OutputLogState::Message);
}
#[ inline ]
pub fn message <
Message: Into <String>,
> (
& self,
message: Message,
) {
self.add_log (
format! (
"{}{}",
self.prefix,
message.into ()),
OutputLogState::Message);
}
#[ inline ]
pub fn debug_format (
& self,
arguments: fmt::Arguments,
) {
if self.debug {
self.add_log (
format! (
"{}{}",
self.prefix,
arguments),
OutputLogState::Message);
}
}
#[ inline ]
pub fn notice <
Message: Into <String>,
> (
& self,
message: Message,
) {
if self.notice {
self.add_log (
format! (
"{}{}",
self.prefix,
message.into ()),
OutputLogState::Message);
}
}
#[ inline ]
pub fn notice_format (
& self,
arguments: fmt::Arguments,
) {
if self.notice {
self.add_log (
format! (
"{}{}",
self.prefix,
arguments),
OutputLogState::Message);
}
}
#[ inline ]
pub fn debug <
Message: Into <String>,
> (
& self,
message: Message,
) {
if self.debug {
self.add_log (
format! (
"{}{}",
self.prefix,
message.into ()),
OutputLogState::Message);
}
}
#[ inline ]
pub fn start_job <
MessageString: Into <String>,
> (
& self,
message: MessageString,
) -> OutputLog {
self.add_log (
format! (
"{}{}",
self.prefix,
message.into ()),
OutputLogState::Running)
}
#[ inline ]
pub fn pause (
& self,
) {
let mut self_state =
self.state.lock ().unwrap ();
self_state.pause ();
}
#[ inline ]
pub fn unpause (
& self,
) {
let mut self_state =
self.state.lock ().unwrap ();
self_state.unpause ();
}
#[ inline ]
pub fn flush (
& self,
) {
let mut self_state =
self.state.lock ().unwrap ();
self_state.flush ();
}
#[ inline ]
pub fn add_log (
& self,
message: String,
state: OutputLogState,
) -> OutputLog {
let log_id = {
let mut self_state =
self.state.lock ().unwrap ();
self_state.add_log (
message,
state)
};
OutputLog::new (
Some (self.state.clone ()),
log_id,
)
}
}
// ex: noet ts=4 filetype=rust
|
pub fn demo() {
// let v = Vec!{1,2,3}
// println!(v)
}
|
pub fn is_armstrong_number(num: u32) -> bool {
let digits = get_digits(num);
let len = digits.len() as u32;
let armstrong_number: u32 = digits
.into_iter()
.map(|x| x.pow(len))
.sum();
armstrong_number == num
}
fn get_digits(num: u32) -> Vec<u32> {
let mut digits: Vec<u32> = vec![];
let mut _temp = num;
while _temp > 0 {
digits.push(_temp % 10);
_temp /= 10;
}
digits
}
|
extern crate rand;
use rand::Rng;
use std::fmt;
type IP = (u8, u8, u8, u8);
trait Printable {
fn print(&self) -> ();
}
impl Printable for IP {
fn print(&self) {
let (o0, o1, o2, o3) = *self;
println!("{}.{}.{}.{}", o0, o1, o2, o3);
}
}
pub struct UUID {
data: [u8; 16],
}
impl fmt::Display for UUID {
fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> {
for i in 0..16 {
if i == 4 || i == 6 || i == 8 || i == 10 {
fmt.write_str("-");
}
fmt.write_str(&format!("{:x}", self.data[i])[..]);
}
Ok(())
}
}
impl rand::Rand for UUID {
fn rand<R: Rng>(rng: &mut R) -> UUID {
let mut data = [0u8; 16];
rng.fill_bytes(&mut data);
UUID { data: data }
}
}
fn main() {
let ip: IP = rand::random();
ip.print();
let uuid: UUID = rand::random();
println!("{}", uuid);
}
|
//! # commands
//!
//! All command implementations.
use std::{
fs::create_dir,
path::PathBuf
};
use config::RuntimeConfig;
use pipeline::Pipeline;
use prettytable::Table;
use wordpress::Plugin;
/// Get all plugins which are being managed.
pub fn get_managed_plugins(config: &RuntimeConfig) -> Vec<Plugin> {
let mut plugins: Vec<Plugin> = Vec::new();
let cwd = config.cwd.clone();
let plugins_being_managed: Vec<_> = config.plugins.clone();
if plugins_being_managed.len() < 1 {
return Vec::new();
}
for plugin_cfg in plugins_being_managed {
plugins.push(Plugin::from_config(plugin_cfg, &cwd));
}
plugins
}
/// Creates a directory for backups.
fn maybe_create_backups_directory(config: &RuntimeConfig) -> Result<PathBuf, &'static str> {
let mut backup_dir: PathBuf = config.cwd.clone();
backup_dir.push(".wpprbackups");
if backup_dir.exists() && backup_dir.is_dir() {
return Ok(backup_dir);
}
let created = create_dir(&backup_dir);
if created.is_ok() {
return Ok(backup_dir);
}
return Err("Could not create backups directory, do you have proper permissions?");
}
/// Lists managed WordPress plugins.
pub fn list(config: RuntimeConfig) -> Result<bool, String> {
println!("Listing managed plugins");
let plugins: Vec<Plugin> = get_managed_plugins(&config);
if plugins.len() < 1 {
println!("Configuration has no plugins defined");
return Ok(true);
}
let mut plugin_table = Table::new();
plugin_table.add_row(row!["Plugin", "Valid", "Version", "Package name", "Remote"]);
for plugin in plugins {
let validity = match plugin.is_valid() {
true => "true",
false => "false",
};
plugin_table.add_row(row![
&plugin.nicename.unwrap_or("invalid".to_string()),
&validity,
&plugin.installed_version.unwrap_or("unknown".to_string()),
&plugin.package_name,
&plugin.remote_repository
]);
}
plugin_table.printstd();
Ok(true)
}
/// Runs upgrades and gitifications on managed WordPress plugins.
pub fn run(config: RuntimeConfig) -> Result<bool, String> {
let plugins: Vec<Plugin> = get_managed_plugins(&config);
if plugins.len() < 1 {
println!("Configuration has no plugins defined");
return Ok(true);
}
// create a directory for plugin backups
let backup_dir = maybe_create_backups_directory(&config)?;
let mut plugin_table = Table::new();
plugin_table.add_row(row!["Plugin", "Result", "Notes"]);
for plugin in plugins {
let valid = plugin.is_valid();
let p_nicename = plugin.get_nicename();
if !valid {
plugin_table.add_row(row![
&p_nicename,
"false",
"Plugin invalid, cannot run upgrades"
]);
continue;
}
let mut pipeline = Pipeline::new(&config, &plugin, &backup_dir)?;
let result = pipeline.run();
match result {
Ok(_) => {
plugin_table.add_row(row![&p_nicename, "ok", ""]);
}
Err(e) => {
plugin_table.add_row(row![&p_nicename, "error", e]);
}
};
}
plugin_table.printstd();
Ok(true)
}
|
//! Contains functionality particular to the BCM2837 board.
//!
//! There is no published documenation for the BCM2837 board in particular, but a lot of the
//! specifications are similar to the [BCM2835] and [BCM2836].
//!
//! [BCM2835]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf
//! [BCM2836]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf
pub mod mem;
pub mod mailbox;
pub mod timers;
/// Macro which hangs the CPU, either indefinitely or for a specific number of microseconds.
#[macro_export]
macro_rules! hang {
() => (
loop {}
);
($us:expr) => (
::board::hang($us);
);
}
/// Hang the CPU for a specific number of microseconds.
pub fn hang(duration: u32) {
use self::timers::system_timer as timer;
use self::mem;
let start = timer::read();
let mut now = timer::read();
while now - start < duration {
now = timer::read();
}
// Need a data memory barrier after reading a peripheral's memory due to a feature of the
// processor which might allow data to arrive out of order.
//
// https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf#page=7
mem::read_barrier();
}
|
use crate::{
domain,
interface::{BlockHeight, BlockTimestamp, EpochHeight},
};
use near_sdk::serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq)]
#[serde(crate = "near_sdk::serde")]
pub struct BlockTimeHeight {
pub block_height: BlockHeight,
pub block_timestamp: BlockTimestamp,
pub epoch_height: EpochHeight,
}
impl From<domain::BlockTimeHeight> for BlockTimeHeight {
fn from(value: domain::BlockTimeHeight) -> Self {
Self {
block_height: value.block_height().into(),
block_timestamp: value.block_timestamp().into(),
epoch_height: value.epoch_height().into(),
}
}
}
|
use std::io::{Error, ErrorKind};
use paho_mqtt::{AsyncClient, Message};
use serde_json::from_str;
use crate::external_interface::announce_blackbox;
use crate::mqtt_broker_manager::{REGISTERED_TOPIC, UNREGISTERED_TOPIC};
use super::structs::{Command, CommandType};
/**
* Converts the `Command` struct to a string then publishes it to the nodes topic.
* QoS valid values are: `0, 1, 2`
* If there is a problem parsing the `Command` struct the function returns an error.
*/
pub fn send_node_command(
mqtt_cli: &AsyncClient,
cmd: CommandType,
node_id: &str,
data: Option<&str>,
qos: i32,
) -> Result<(), Error> {
if let Some(cmd) = Command::new(cmd, data.unwrap_or_default()).to_string() {
let msg = Message::new([REGISTERED_TOPIC, "/", node_id].concat(), cmd, qos);
mqtt_cli.publish(msg);
return Ok(());
}
Err(Error::new(ErrorKind::Other, "Could not send MQTT message"))
}
/**
* Publishes an 'Announce' message to unregistered topic.
*/
pub fn announce_discovery(mqtt_cli: &AsyncClient) {
if let Some(cmd) = Command::new(CommandType::Announce, "").to_string() {
let msg = Message::new(UNREGISTERED_TOPIC, cmd, 1);
mqtt_cli.publish(msg);
}
}
/**
* Publishes an 'Announce' message to registered and WebInterface topics.
*/
pub fn announce_blackbox_online(mqtt_cli: &AsyncClient) {
if let Some(cmd) = Command::new(CommandType::Announce, "").to_string() {
let msg = Message::new(REGISTERED_TOPIC, cmd, 1);
mqtt_cli.publish(msg);
}
// Tell ExternalInterface that BlackBox is online
announce_blackbox(mqtt_cli, true);
}
/**
*
*/
pub fn restart_node(mqtt_cli: &AsyncClient, node_id: &str) -> Result<(), Error> {
send_node_command(mqtt_cli, CommandType::RestartDevice, node_id, None, 2)
}
/**
*
*/
pub fn unregistered_notify(mqtt_cli: &AsyncClient, node_id: &str) -> Result<(), Error> {
send_node_command(mqtt_cli, CommandType::UnregisterNotify, node_id, None, 2)
}
/**
*
*/
pub fn element_set(mqtt_cli: &AsyncClient, data: &str) -> Result<(), Error> {
#[derive(Serialize)]
struct ElementData {
id: String,
data: String,
}
match from_str::<super::structs::ElementSet>(data) {
Ok(res) => {
let ser_data = ElementData {
id: res.element_identifier,
data: res.data,
};
send_node_command(
mqtt_cli,
CommandType::SetElementState,
&res.node_identifier,
Some(&serde_json::to_string(&ser_data).unwrap_or_default()),
1,
)
}
Err(e) => {
Err(Error::new(
ErrorKind::InvalidData,
format!("Could not parse data. {}", e),
))
}
}
}
/**
*
*
* Sent to unregistered nodes.
*/
pub fn send_credentials(
mqtt_cli: &AsyncClient,
unreged_id: &str,
reged_id: &str,
new_pass: &str,
) -> Result<(), ()> {
let payload = [reged_id, ":", new_pass].concat();
if let Some(cmd) = Command::new(CommandType::ImplementCreds, &payload).to_string() {
let topic = [UNREGISTERED_TOPIC, "/", unreged_id].concat();
let msg = Message::new(topic, cmd, 2);
mqtt_cli.publish(msg);
return Ok(());
}
Err(())
}
|
use std::fmt::Debug;
use async_trait::async_trait;
use data_types::sequence_number_set::SequenceNumberSet;
use tokio::sync::watch::Receiver;
use wal::WriteResult;
use crate::dml_payload::IngestOp;
/// An abstraction over a write-ahead log, decoupling the write path from the
/// underlying implementation.
pub(super) trait WalAppender: Send + Sync + Debug {
/// Add `op` to the write-head log, returning once `op` is durable.
fn append(&self, op: &IngestOp) -> Receiver<Option<WriteResult>>;
}
/// An abstraction over a sequence number tracker for a write-ahead log,
/// decoupling the write path from the underlying implementation.
#[async_trait]
pub(super) trait UnbufferedWriteNotifier: Send + Sync + Debug {
/// Notifies the receiver that a write with the given [`SequenceNumberSet`]
/// failed to buffer.
async fn notify_failed_write_buffer(&self, set: SequenceNumberSet);
}
|
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
mod remote_client;
mod utils;
use {
crate::{
buffer::{BufferProvider, OutBuf},
device::{Device, TxFlags},
error::Error,
write_eth_frame,
},
fidl_fuchsia_wlan_mlme as fidl_mlme,
log::info,
std::collections::HashMap,
wlan_common::{
buffer_writer::BufferWriter,
frame_len,
mac::{
self, Aid, AuthAlgorithmNumber, Bssid, MacAddr, OptionalField, Presence, StatusCode,
},
sequence::SequenceManager,
},
};
pub use remote_client::*;
pub use utils::*;
struct InfraBss {
// TODO(37891): Consider removing this, as only the SME really needs to know about it.
pub ssid: Vec<u8>,
pub is_rsn: bool,
pub clients: HashMap<MacAddr, RemoteClient>,
}
// TODO(37891): Use this code.
#[allow(dead_code)]
impl InfraBss {
fn new(ssid: Vec<u8>, is_rsn: bool) -> Self {
Self { ssid, is_rsn, clients: HashMap::new() }
}
}
pub struct Context {
device: Device,
buf_provider: BufferProvider,
seq_mgr: SequenceManager,
bssid: Bssid,
}
impl Context {
pub fn new(device: Device, buf_provider: BufferProvider, bssid: Bssid) -> Self {
Self { device, buf_provider, seq_mgr: SequenceManager::new(), bssid }
}
// MLME sender functions.
/// Sends MLME-AUTHENTICATE.indication (IEEE Std 802.11-2016, 6.3.5.4) to the SME.
pub fn send_mlme_auth_ind(
&self,
peer_sta_address: MacAddr,
auth_type: fidl_mlme::AuthenticationTypes,
) -> Result<(), Error> {
self.device.access_sme_sender(|sender| {
sender.send_authenticate_ind(&mut fidl_mlme::AuthenticateIndication {
peer_sta_address,
auth_type,
})
})
}
/// Sends MLME-DEAUTHENTICATE.indication (IEEE Std 802.11-2016, 6.3.6.4) to the SME.
pub fn send_mlme_deauth_ind(
&self,
peer_sta_address: MacAddr,
reason_code: fidl_mlme::ReasonCode,
) -> Result<(), Error> {
self.device.access_sme_sender(|sender| {
sender.send_deauthenticate_ind(&mut fidl_mlme::DeauthenticateIndication {
peer_sta_address,
reason_code,
})
})
}
/// Sends MLME-ASSOCIATE.indication (IEEE Std 802.11-2016, 6.3.7.4) to the SME.
pub fn send_mlme_assoc_ind(
&self,
peer_sta_address: MacAddr,
listen_interval: u16,
ssid: Option<Vec<u8>>,
rsne: Option<Vec<u8>>,
) -> Result<(), Error> {
self.device.access_sme_sender(|sender| {
sender.send_associate_ind(&mut fidl_mlme::AssociateIndication {
peer_sta_address,
listen_interval,
ssid,
rsne,
// TODO(37891): Send everything else (e.g. HT capabilities).
})
})
}
/// Sends MLME-DISASSOCIATE.indication (IEEE Std 802.11-2016, 6.3.9.3) to the SME.
pub fn send_mlme_disassoc_ind(
&self,
peer_sta_address: MacAddr,
reason_code: u16,
) -> Result<(), Error> {
self.device.access_sme_sender(|sender| {
sender.send_disassociate_ind(&mut fidl_mlme::DisassociateIndication {
peer_sta_address,
reason_code,
})
})
}
/// Sends EAPOL.indication (fuchsia.wlan.mlme.EapolIndication) to the SME.
pub fn send_mlme_eapol_ind(
&self,
dst_addr: MacAddr,
src_addr: MacAddr,
data: &[u8],
) -> Result<(), Error> {
self.device.access_sme_sender(|sender| {
sender.send_eapol_ind(&mut fidl_mlme::EapolIndication {
dst_addr,
src_addr,
data: data.to_vec(),
})
})
}
// WLAN frame sender functions.
/// Sends a WLAN authentication frame (IEEE Std 802.11-2016, 9.3.3.12) to the PHY.
pub fn send_auth_frame(
&mut self,
addr: MacAddr,
auth_alg_num: AuthAlgorithmNumber,
auth_txn_seq_num: u16,
status_code: StatusCode,
) -> Result<(), Error> {
const FRAME_LEN: usize = frame_len!(mac::MgmtHdr, mac::AuthHdr);
let mut buf = self.buf_provider.get_buffer(FRAME_LEN)?;
let mut w = BufferWriter::new(&mut buf[..]);
write_auth_frame(
&mut w,
addr,
self.bssid.clone(),
&mut self.seq_mgr,
auth_alg_num,
auth_txn_seq_num,
status_code,
)?;
let bytes_written = w.bytes_written();
let out_buf = OutBuf::from(buf, bytes_written);
self.device
.send_wlan_frame(out_buf, TxFlags::NONE)
.map_err(|s| Error::Status(format!("error sending auth frame"), s))
}
/// Sends a WLAN association response frame (IEEE Std 802.11-2016, 9.3.3.7) to the PHY.
fn send_assoc_resp_frame(
&mut self,
addr: MacAddr,
capabilities: mac::CapabilityInfo,
status_code: StatusCode,
aid: Aid,
ies: &[u8],
) -> Result<(), Error> {
let mut buf =
self.buf_provider.get_buffer(frame_len!(mac::MgmtHdr, mac::AuthHdr) + ies.len())?;
let mut w = BufferWriter::new(&mut buf[..]);
write_assoc_resp_frame(
&mut w,
addr,
self.bssid.clone(),
&mut self.seq_mgr,
capabilities,
status_code,
aid,
ies,
)?;
let bytes_written = w.bytes_written();
let out_buf = OutBuf::from(buf, bytes_written);
self.device
.send_wlan_frame(out_buf, TxFlags::NONE)
.map_err(|s| Error::Status(format!("error sending open auth frame"), s))
}
/// Sends a WLAN deauthentication frame (IEEE Std 802.11-2016, 9.3.3.1) to the PHY.
fn send_deauth_frame(
&mut self,
addr: MacAddr,
reason_code: mac::ReasonCode,
) -> Result<(), Error> {
let mut buf = self.buf_provider.get_buffer(frame_len!(mac::MgmtHdr, mac::DeauthHdr))?;
let mut w = BufferWriter::new(&mut buf[..]);
write_deauth_frame(&mut w, addr, self.bssid.clone(), &mut self.seq_mgr, reason_code)?;
let bytes_written = w.bytes_written();
let out_buf = OutBuf::from(buf, bytes_written);
self.device
.send_wlan_frame(out_buf, TxFlags::NONE)
.map_err(|s| Error::Status(format!("error sending open auth frame"), s))
}
/// Sends a WLAN disassociation frame (IEEE Std 802.11-2016, 9.3.3.5) to the PHY.
fn send_disassoc_frame(
&mut self,
addr: MacAddr,
reason_code: mac::ReasonCode,
) -> Result<(), Error> {
let mut buf = self.buf_provider.get_buffer(frame_len!(mac::MgmtHdr, mac::DeauthHdr))?;
let mut w = BufferWriter::new(&mut buf[..]);
write_disassoc_frame(&mut w, addr, self.bssid.clone(), &mut self.seq_mgr, reason_code)?;
let bytes_written = w.bytes_written();
let out_buf = OutBuf::from(buf, bytes_written);
self.device
.send_wlan_frame(out_buf, TxFlags::NONE)
.map_err(|s| Error::Status(format!("error sending open auth frame"), s))
}
/// Sends a WLAN data frame (IEEE Std 802.11-2016, 9.3.2) to the PHY.
fn send_data_frame(
&mut self,
dst_addr: MacAddr,
src_addr: MacAddr,
is_protected: bool,
is_qos: bool,
ether_type: u16,
payload: &[u8],
) -> Result<(), Error> {
let qos_presence = Presence::from_bool(is_qos);
let data_hdr_len =
mac::FixedDataHdrFields::len(mac::Addr4::ABSENT, qos_presence, mac::HtControl::ABSENT);
let frame_len = data_hdr_len + std::mem::size_of::<mac::LlcHdr>() + payload.len();
let mut buf = self.buf_provider.get_buffer(frame_len)?;
let mut w = BufferWriter::new(&mut buf[..]);
write_data_frame(
&mut w,
&mut self.seq_mgr,
dst_addr,
self.bssid.clone(),
src_addr,
is_protected,
is_qos,
ether_type,
payload,
)?;
let bytes_written = w.bytes_written();
let out_buf = OutBuf::from(buf, bytes_written);
self.device
.send_wlan_frame(
out_buf,
match ether_type {
mac::ETHER_TYPE_EAPOL => TxFlags::FAVOR_RELIABILITY,
_ => TxFlags::NONE,
},
)
.map_err(|s| Error::Status(format!("error sending data frame"), s))
}
/// Sends an EAPoL data frame (IEEE Std 802.1X, 11.3) to the PHY.
fn send_eapol_frame(
&mut self,
dst_addr: MacAddr,
src_addr: MacAddr,
is_protected: bool,
eapol_frame: &[u8],
) -> Result<(), Error> {
self.send_data_frame(
dst_addr,
src_addr,
is_protected,
false, // TODO(37891): Support QoS.
mac::ETHER_TYPE_EAPOL,
eapol_frame,
)
}
// Netstack delivery functions.
/// Delivers the Ethernet II frame to the netstack.
fn deliver_eth_frame(
&mut self,
dst_addr: MacAddr,
src_addr: MacAddr,
protocol_id: u16,
body: &[u8],
) -> Result<(), Error> {
let mut buf = [0u8; mac::MAX_ETH_FRAME_LEN];
let mut writer = BufferWriter::new(&mut buf[..]);
write_eth_frame(&mut writer, dst_addr, src_addr, protocol_id, body)?;
self.device
.deliver_eth_frame(writer.into_written())
.map_err(|s| Error::Status(format!("could not deliver Ethernet II frame"), s))
}
}
pub struct Ap {
// TODO(37891): Make this private once we no longer need to depend on this in C bindings.
pub ctx: Context,
bss: Option<InfraBss>,
}
// TODO(37891): Use this code.
#[allow(dead_code)]
impl Ap {
pub fn new(device: Device, buf_provider: BufferProvider, bssid: Bssid) -> Self {
Self { ctx: Context::new(device, buf_provider, bssid), bss: None }
}
// MLME handler functions.
/// Handles MLME.START.request (IEEE Std 802.11-2016, 6.3.11.2) from the SME.
pub fn handle_mlme_start_req(&mut self, ssid: Vec<u8>) -> Result<(), failure::Error> {
if self.bss.is_some() {
info!("MLME-START.request: BSS already started");
return Ok(());
}
// TODO(37891): Support starting a BSS with RSN.
self.bss.replace(InfraBss::new(ssid, false));
// TODO(37891): Respond to the SME with status code.
Ok(())
}
pub fn handle_mlme_stop_req(&mut self) -> Result<(), failure::Error> {
if self.bss.is_none() {
info!("MLME-STOP.request: BSS not started");
}
self.bss = None;
// TODO(37891): Respond to the SME with status code.
Ok(())
}
}
// TODO(37891): Add test for MLME-START.request when everything is hooked up.
// TODO(37891): Add test for MLME-STOP.request when everything is hooked up.
#[cfg(test)]
mod tests {
use {
super::*,
crate::{buffer::FakeBufferProvider, device::FakeDevice},
};
const CLIENT_ADDR: MacAddr = [1u8; 6];
const BSSID: Bssid = Bssid([2u8; 6]);
const CLIENT_ADDR2: MacAddr = [3u8; 6];
fn make_context(device: Device) -> Context {
Context::new(device, FakeBufferProvider::new(), BSSID)
}
#[test]
fn send_mlme_auth_ind() {
let mut fake_device = FakeDevice::new();
let ctx = make_context(fake_device.as_device());
ctx.send_mlme_auth_ind(CLIENT_ADDR, fidl_mlme::AuthenticationTypes::OpenSystem)
.expect("expected OK");
let msg = fake_device
.next_mlme_msg::<fidl_mlme::AuthenticateIndication>()
.expect("expected MLME message");
assert_eq!(
msg,
fidl_mlme::AuthenticateIndication {
peer_sta_address: CLIENT_ADDR,
auth_type: fidl_mlme::AuthenticationTypes::OpenSystem,
},
);
}
#[test]
fn send_mlme_deauth_ind() {
let mut fake_device = FakeDevice::new();
let ctx = make_context(fake_device.as_device());
ctx.send_mlme_deauth_ind(CLIENT_ADDR, fidl_mlme::ReasonCode::LeavingNetworkDeauth)
.expect("expected OK");
let msg = fake_device
.next_mlme_msg::<fidl_mlme::DeauthenticateIndication>()
.expect("expected MLME message");
assert_eq!(
msg,
fidl_mlme::DeauthenticateIndication {
peer_sta_address: CLIENT_ADDR,
reason_code: fidl_mlme::ReasonCode::LeavingNetworkDeauth,
},
);
}
#[test]
fn send_mlme_assoc_ind() {
let mut fake_device = FakeDevice::new();
let ctx = make_context(fake_device.as_device());
ctx.send_mlme_assoc_ind(CLIENT_ADDR, 1, Some(b"coolnet".to_vec()), None)
.expect("expected OK");
let msg = fake_device
.next_mlme_msg::<fidl_mlme::AssociateIndication>()
.expect("expected MLME message");
assert_eq!(
msg,
fidl_mlme::AssociateIndication {
peer_sta_address: CLIENT_ADDR,
listen_interval: 1,
ssid: Some(b"coolnet".to_vec()),
rsne: None,
},
);
}
#[test]
fn send_mlme_disassoc_ind() {
let mut fake_device = FakeDevice::new();
let ctx = make_context(fake_device.as_device());
ctx.send_mlme_disassoc_ind(
CLIENT_ADDR,
fidl_mlme::ReasonCode::LeavingNetworkDisassoc as u16,
)
.expect("expected OK");
let msg = fake_device
.next_mlme_msg::<fidl_mlme::DisassociateIndication>()
.expect("expected MLME message");
assert_eq!(
msg,
fidl_mlme::DisassociateIndication {
peer_sta_address: CLIENT_ADDR,
reason_code: fidl_mlme::ReasonCode::LeavingNetworkDisassoc as u16,
},
);
}
#[test]
fn send_mlme_eapol_ind() {
let mut fake_device = FakeDevice::new();
let ctx = make_context(fake_device.as_device());
ctx.send_mlme_eapol_ind(CLIENT_ADDR2, CLIENT_ADDR, &[1, 2, 3, 4, 5][..])
.expect("expected OK");
let msg = fake_device
.next_mlme_msg::<fidl_mlme::EapolIndication>()
.expect("expected MLME message");
assert_eq!(
msg,
fidl_mlme::EapolIndication {
dst_addr: CLIENT_ADDR2,
src_addr: CLIENT_ADDR,
data: vec![1, 2, 3, 4, 5],
},
);
}
#[test]
fn ctx_send_auth_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.send_auth_frame(
CLIENT_ADDR,
AuthAlgorithmNumber::FAST_BSS_TRANSITION,
3,
StatusCode::TRANSACTION_SEQUENCE_ERROR,
)
.expect("error delivering WLAN frame");
assert_eq!(fake_device.wlan_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.wlan_queue[0].0[..], &[
// Mgmt header
0b10110000, 0, // Frame Control
0, 0, // Duration
1, 1, 1, 1, 1, 1, // addr1
2, 2, 2, 2, 2, 2, // addr2
2, 2, 2, 2, 2, 2, // addr3
0x10, 0, // Sequence Control
// Auth header:
2, 0, // auth algorithm
3, 0, // auth txn seq num
14, 0, // Status code
][..]);
}
#[test]
fn ctx_send_assoc_resp_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.send_assoc_resp_frame(
CLIENT_ADDR,
mac::CapabilityInfo(0),
StatusCode::REJECTED_EMERGENCY_SERVICES_NOT_SUPPORTED,
1,
&[0, 4, 1, 2, 3, 4],
)
.expect("error delivering WLAN frame");
assert_eq!(fake_device.wlan_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.wlan_queue[0].0[..], &[
// Mgmt header
0b00010000, 0, // Frame Control
0, 0, // Duration
1, 1, 1, 1, 1, 1, // addr1
2, 2, 2, 2, 2, 2, // addr2
2, 2, 2, 2, 2, 2, // addr3
0x10, 0, // Sequence Control
// Association response header:
0, 0, // Capabilities
94, 0, // status code
1, 0, // AID
0, 4, 1, 2, 3, 4, // SSID
][..]);
}
#[test]
fn ctx_send_disassoc_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.send_disassoc_frame(CLIENT_ADDR, mac::ReasonCode::LEAVING_NETWORK_DISASSOC)
.expect("error delivering WLAN frame");
assert_eq!(fake_device.wlan_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.wlan_queue[0].0[..], &[
// Mgmt header
0b10100000, 0, // Frame Control
0, 0, // Duration
1, 1, 1, 1, 1, 1, // addr1
2, 2, 2, 2, 2, 2, // addr2
2, 2, 2, 2, 2, 2, // addr3
0x10, 0, // Sequence Control
// Disassoc header:
8, 0, // reason code
][..]);
}
#[test]
fn ctx_send_data_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.send_data_frame(CLIENT_ADDR2, CLIENT_ADDR, false, false, 0x1234, &[1, 2, 3, 4, 5])
.expect("error delivering WLAN frame");
assert_eq!(fake_device.wlan_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.wlan_queue[0].0[..], &[
// Mgmt header
0b00001000, 0b00000010, // Frame Control
0, 0, // Duration
3, 3, 3, 3, 3, 3, // addr1
2, 2, 2, 2, 2, 2, // addr2
1, 1, 1, 1, 1, 1, // addr3
0x10, 0, // Sequence Control
0xAA, 0xAA, 0x03, // DSAP, SSAP, Control, OUI
0, 0, 0, // OUI
0x12, 0x34, // Protocol ID
// Data
1, 2, 3, 4, 5,
][..]);
}
#[test]
fn ctx_send_eapol_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.send_eapol_frame(CLIENT_ADDR2, CLIENT_ADDR, false, &[1, 2, 3, 4, 5])
.expect("error delivering WLAN frame");
assert_eq!(fake_device.wlan_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.wlan_queue[0].0[..], &[
// Mgmt header
0b00001000, 0b00000010, // Frame Control
0, 0, // Duration
3, 3, 3, 3, 3, 3, // addr1
2, 2, 2, 2, 2, 2, // addr2
1, 1, 1, 1, 1, 1, // addr3
0x10, 0, // Sequence Control
0xAA, 0xAA, 0x03, // DSAP, SSAP, Control, OUI
0, 0, 0, // OUI
0x88, 0x8E, // EAPOL protocol ID
// Data
1, 2, 3, 4, 5,
][..]);
}
#[test]
fn ctx_deliver_eth_frame() {
let mut fake_device = FakeDevice::new();
let mut ctx = make_context(fake_device.as_device());
ctx.deliver_eth_frame(CLIENT_ADDR2, CLIENT_ADDR, 0x1234, &[1, 2, 3, 4, 5][..])
.expect("expected OK");
assert_eq!(fake_device.eth_queue.len(), 1);
#[rustfmt::skip]
assert_eq!(&fake_device.eth_queue[0][..], &[
3, 3, 3, 3, 3, 3, // dest
1, 1, 1, 1, 1, 1, // src
0x12, 0x34, // ether_type
// Data
1, 2, 3, 4, 5,
][..]);
}
}
|
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub fn parse_http_generic_error(
response: &http::Response<bytes::Bytes>,
) -> Result<smithy_types::Error, smithy_xml::decode::XmlError> {
crate::ec2_query_errors::parse_generic_error(response.body().as_ref())
}
#[allow(unused_mut)]
pub fn deser_operation_accept_reserved_instances_exchange_quote(
inp: &[u8],
mut builder: crate::output::accept_reserved_instances_exchange_quote_output::Builder,
) -> Result<
crate::output::accept_reserved_instances_exchange_quote_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptReservedInstancesExchangeQuoteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AcceptReservedInstancesExchangeQuoteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("exchangeId") /* ExchangeId com.amazonaws.ec2#AcceptReservedInstancesExchangeQuoteOutput$ExchangeId */ => {
let var_1 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_exchange_id(var_1);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_accept_transit_gateway_multicast_domain_associations(
inp: &[u8],
mut builder: crate::output::accept_transit_gateway_multicast_domain_associations_output::Builder,
) -> Result<
crate::output::accept_transit_gateway_multicast_domain_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptTransitGatewayMulticastDomainAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!("invalid root, expected AcceptTransitGatewayMulticastDomainAssociationsResponse got {:?}", start_el)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associations") /* Associations com.amazonaws.ec2#AcceptTransitGatewayMulticastDomainAssociationsOutput$Associations */ => {
let var_2 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_associations(&mut tag)
?
)
;
builder = builder.set_associations(var_2);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_accept_transit_gateway_peering_attachment(
inp: &[u8],
mut builder: crate::output::accept_transit_gateway_peering_attachment_output::Builder,
) -> Result<
crate::output::accept_transit_gateway_peering_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptTransitGatewayPeeringAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AcceptTransitGatewayPeeringAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPeeringAttachment") /* TransitGatewayPeeringAttachment com.amazonaws.ec2#AcceptTransitGatewayPeeringAttachmentOutput$TransitGatewayPeeringAttachment */ => {
let var_3 =
Some(
crate::xml_deser::deser_structure_transit_gateway_peering_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_peering_attachment(var_3);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_accept_transit_gateway_vpc_attachment(
inp: &[u8],
mut builder: crate::output::accept_transit_gateway_vpc_attachment_output::Builder,
) -> Result<
crate::output::accept_transit_gateway_vpc_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptTransitGatewayVpcAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AcceptTransitGatewayVpcAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachment") /* TransitGatewayVpcAttachment com.amazonaws.ec2#AcceptTransitGatewayVpcAttachmentOutput$TransitGatewayVpcAttachment */ => {
let var_4 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachment(var_4);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_accept_vpc_endpoint_connections(
inp: &[u8],
mut builder: crate::output::accept_vpc_endpoint_connections_output::Builder,
) -> Result<
crate::output::accept_vpc_endpoint_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptVpcEndpointConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AcceptVpcEndpointConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#AcceptVpcEndpointConnectionsOutput$Unsuccessful */ => {
let var_5 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_5);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_accept_vpc_peering_connection(
inp: &[u8],
mut builder: crate::output::accept_vpc_peering_connection_output::Builder,
) -> Result<
crate::output::accept_vpc_peering_connection_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AcceptVpcPeeringConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AcceptVpcPeeringConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcPeeringConnection") /* VpcPeeringConnection com.amazonaws.ec2#AcceptVpcPeeringConnectionOutput$VpcPeeringConnection */ => {
let var_6 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection(&mut tag)
?
)
;
builder = builder.set_vpc_peering_connection(var_6);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_advertise_byoip_cidr(
inp: &[u8],
mut builder: crate::output::advertise_byoip_cidr_output::Builder,
) -> Result<crate::output::advertise_byoip_cidr_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AdvertiseByoipCidrResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AdvertiseByoipCidrResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("byoipCidr") /* ByoipCidr com.amazonaws.ec2#AdvertiseByoipCidrOutput$ByoipCidr */ => {
let var_7 =
Some(
crate::xml_deser::deser_structure_byoip_cidr(&mut tag)
?
)
;
builder = builder.set_byoip_cidr(var_7);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_allocate_address(
inp: &[u8],
mut builder: crate::output::allocate_address_output::Builder,
) -> Result<crate::output::allocate_address_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AllocateAddressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AllocateAddressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#AllocateAddressOutput$PublicIp */ => {
let var_8 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_8);
}
,
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#AllocateAddressOutput$AllocationId */ => {
let var_9 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_9);
}
,
s if s.matches("publicIpv4Pool") /* PublicIpv4Pool com.amazonaws.ec2#AllocateAddressOutput$PublicIpv4Pool */ => {
let var_10 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ipv4_pool(var_10);
}
,
s if s.matches("networkBorderGroup") /* NetworkBorderGroup com.amazonaws.ec2#AllocateAddressOutput$NetworkBorderGroup */ => {
let var_11 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_border_group(var_11);
}
,
s if s.matches("domain") /* Domain com.amazonaws.ec2#AllocateAddressOutput$Domain */ => {
let var_12 =
Some(
Result::<crate::model::DomainType, smithy_xml::decode::XmlError>::Ok(
crate::model::DomainType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_domain(var_12);
}
,
s if s.matches("customerOwnedIp") /* CustomerOwnedIp com.amazonaws.ec2#AllocateAddressOutput$CustomerOwnedIp */ => {
let var_13 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ip(var_13);
}
,
s if s.matches("customerOwnedIpv4Pool") /* CustomerOwnedIpv4Pool com.amazonaws.ec2#AllocateAddressOutput$CustomerOwnedIpv4Pool */ => {
let var_14 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ipv4_pool(var_14);
}
,
s if s.matches("carrierIp") /* CarrierIp com.amazonaws.ec2#AllocateAddressOutput$CarrierIp */ => {
let var_15 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_ip(var_15);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_allocate_hosts(
inp: &[u8],
mut builder: crate::output::allocate_hosts_output::Builder,
) -> Result<crate::output::allocate_hosts_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AllocateHostsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AllocateHostsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("hostIdSet") /* HostIds com.amazonaws.ec2#AllocateHostsOutput$HostIds */ => {
let var_16 =
Some(
crate::xml_deser::deser_list_response_host_id_list(&mut tag)
?
)
;
builder = builder.set_host_ids(var_16);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_apply_security_groups_to_client_vpn_target_network(
inp: &[u8],
mut builder: crate::output::apply_security_groups_to_client_vpn_target_network_output::Builder,
) -> Result<
crate::output::apply_security_groups_to_client_vpn_target_network_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ApplySecurityGroupsToClientVpnTargetNetworkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ApplySecurityGroupsToClientVpnTargetNetworkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("securityGroupIds") /* SecurityGroupIds com.amazonaws.ec2#ApplySecurityGroupsToClientVpnTargetNetworkOutput$SecurityGroupIds */ => {
let var_17 =
Some(
crate::xml_deser::deser_list_client_vpn_security_group_id_set(&mut tag)
?
)
;
builder = builder.set_security_group_ids(var_17);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_assign_ipv6_addresses(
inp: &[u8],
mut builder: crate::output::assign_ipv6_addresses_output::Builder,
) -> Result<crate::output::assign_ipv6_addresses_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssignIpv6AddressesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssignIpv6AddressesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("assignedIpv6Addresses") /* AssignedIpv6Addresses com.amazonaws.ec2#AssignIpv6AddressesOutput$AssignedIpv6Addresses */ => {
let var_18 =
Some(
crate::xml_deser::deser_list_ipv6_address_list(&mut tag)
?
)
;
builder = builder.set_assigned_ipv6_addresses(var_18);
}
,
s if s.matches("assignedIpv6PrefixSet") /* AssignedIpv6Prefixes com.amazonaws.ec2#AssignIpv6AddressesOutput$AssignedIpv6Prefixes */ => {
let var_19 =
Some(
crate::xml_deser::deser_list_ip_prefix_list(&mut tag)
?
)
;
builder = builder.set_assigned_ipv6_prefixes(var_19);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#AssignIpv6AddressesOutput$NetworkInterfaceId */ => {
let var_20 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_20);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_assign_private_ip_addresses(
inp: &[u8],
mut builder: crate::output::assign_private_ip_addresses_output::Builder,
) -> Result<crate::output::assign_private_ip_addresses_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssignPrivateIpAddressesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssignPrivateIpAddressesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#AssignPrivateIpAddressesOutput$NetworkInterfaceId */ => {
let var_21 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_21);
}
,
s if s.matches("assignedPrivateIpAddressesSet") /* AssignedPrivateIpAddresses com.amazonaws.ec2#AssignPrivateIpAddressesOutput$AssignedPrivateIpAddresses */ => {
let var_22 =
Some(
crate::xml_deser::deser_list_assigned_private_ip_address_list(&mut tag)
?
)
;
builder = builder.set_assigned_private_ip_addresses(var_22);
}
,
s if s.matches("assignedIpv4PrefixSet") /* AssignedIpv4Prefixes com.amazonaws.ec2#AssignPrivateIpAddressesOutput$AssignedIpv4Prefixes */ => {
let var_23 =
Some(
crate::xml_deser::deser_list_ipv4_prefixes_list(&mut tag)
?
)
;
builder = builder.set_assigned_ipv4_prefixes(var_23);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_address(
inp: &[u8],
mut builder: crate::output::associate_address_output::Builder,
) -> Result<crate::output::associate_address_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateAddressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateAddressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#AssociateAddressOutput$AssociationId */ => {
let var_24 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_24);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_client_vpn_target_network(
inp: &[u8],
mut builder: crate::output::associate_client_vpn_target_network_output::Builder,
) -> Result<
crate::output::associate_client_vpn_target_network_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateClientVpnTargetNetworkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateClientVpnTargetNetworkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#AssociateClientVpnTargetNetworkOutput$AssociationId */ => {
let var_25 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_25);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#AssociateClientVpnTargetNetworkOutput$Status */ => {
let var_26 =
Some(
crate::xml_deser::deser_structure_association_status(&mut tag)
?
)
;
builder = builder.set_status(var_26);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_enclave_certificate_iam_role(
inp: &[u8],
mut builder: crate::output::associate_enclave_certificate_iam_role_output::Builder,
) -> Result<
crate::output::associate_enclave_certificate_iam_role_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateEnclaveCertificateIamRoleResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateEnclaveCertificateIamRoleResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("certificateS3BucketName") /* CertificateS3BucketName com.amazonaws.ec2#AssociateEnclaveCertificateIamRoleOutput$CertificateS3BucketName */ => {
let var_27 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_s3_bucket_name(var_27);
}
,
s if s.matches("certificateS3ObjectKey") /* CertificateS3ObjectKey com.amazonaws.ec2#AssociateEnclaveCertificateIamRoleOutput$CertificateS3ObjectKey */ => {
let var_28 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_s3_object_key(var_28);
}
,
s if s.matches("encryptionKmsKeyId") /* EncryptionKmsKeyId com.amazonaws.ec2#AssociateEnclaveCertificateIamRoleOutput$EncryptionKmsKeyId */ => {
let var_29 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_encryption_kms_key_id(var_29);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_iam_instance_profile(
inp: &[u8],
mut builder: crate::output::associate_iam_instance_profile_output::Builder,
) -> Result<
crate::output::associate_iam_instance_profile_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateIamInstanceProfileResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateIamInstanceProfileResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("iamInstanceProfileAssociation") /* IamInstanceProfileAssociation com.amazonaws.ec2#AssociateIamInstanceProfileOutput$IamInstanceProfileAssociation */ => {
let var_30 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile_association(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile_association(var_30);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_instance_event_window(
inp: &[u8],
mut builder: crate::output::associate_instance_event_window_output::Builder,
) -> Result<
crate::output::associate_instance_event_window_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateInstanceEventWindowResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateInstanceEventWindowResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindow") /* InstanceEventWindow com.amazonaws.ec2#AssociateInstanceEventWindowOutput$InstanceEventWindow */ => {
let var_31 =
Some(
crate::xml_deser::deser_structure_instance_event_window(&mut tag)
?
)
;
builder = builder.set_instance_event_window(var_31);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_route_table(
inp: &[u8],
mut builder: crate::output::associate_route_table_output::Builder,
) -> Result<crate::output::associate_route_table_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#AssociateRouteTableOutput$AssociationId */ => {
let var_32 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_32);
}
,
s if s.matches("associationState") /* AssociationState com.amazonaws.ec2#AssociateRouteTableOutput$AssociationState */ => {
let var_33 =
Some(
crate::xml_deser::deser_structure_route_table_association_state(&mut tag)
?
)
;
builder = builder.set_association_state(var_33);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_subnet_cidr_block(
inp: &[u8],
mut builder: crate::output::associate_subnet_cidr_block_output::Builder,
) -> Result<crate::output::associate_subnet_cidr_block_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateSubnetCidrBlockResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateSubnetCidrBlockResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrBlockAssociation") /* Ipv6CidrBlockAssociation com.amazonaws.ec2#AssociateSubnetCidrBlockOutput$Ipv6CidrBlockAssociation */ => {
let var_34 =
Some(
crate::xml_deser::deser_structure_subnet_ipv6_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association(var_34);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#AssociateSubnetCidrBlockOutput$SubnetId */ => {
let var_35 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_35);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_transit_gateway_multicast_domain(
inp: &[u8],
mut builder: crate::output::associate_transit_gateway_multicast_domain_output::Builder,
) -> Result<
crate::output::associate_transit_gateway_multicast_domain_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateTransitGatewayMulticastDomainResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateTransitGatewayMulticastDomainResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associations") /* Associations com.amazonaws.ec2#AssociateTransitGatewayMulticastDomainOutput$Associations */ => {
let var_36 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_associations(&mut tag)
?
)
;
builder = builder.set_associations(var_36);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_transit_gateway_route_table(
inp: &[u8],
mut builder: crate::output::associate_transit_gateway_route_table_output::Builder,
) -> Result<
crate::output::associate_transit_gateway_route_table_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateTransitGatewayRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateTransitGatewayRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#AssociateTransitGatewayRouteTableOutput$Association */ => {
let var_37 =
Some(
crate::xml_deser::deser_structure_transit_gateway_association(&mut tag)
?
)
;
builder = builder.set_association(var_37);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_trunk_interface(
inp: &[u8],
mut builder: crate::output::associate_trunk_interface_output::Builder,
) -> Result<crate::output::associate_trunk_interface_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateTrunkInterfaceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateTrunkInterfaceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("interfaceAssociation") /* InterfaceAssociation com.amazonaws.ec2#AssociateTrunkInterfaceOutput$InterfaceAssociation */ => {
let var_38 =
Some(
crate::xml_deser::deser_structure_trunk_interface_association(&mut tag)
?
)
;
builder = builder.set_interface_association(var_38);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#AssociateTrunkInterfaceOutput$ClientToken */ => {
let var_39 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_39);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_associate_vpc_cidr_block(
inp: &[u8],
mut builder: crate::output::associate_vpc_cidr_block_output::Builder,
) -> Result<crate::output::associate_vpc_cidr_block_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AssociateVpcCidrBlockResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AssociateVpcCidrBlockResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrBlockAssociation") /* Ipv6CidrBlockAssociation com.amazonaws.ec2#AssociateVpcCidrBlockOutput$Ipv6CidrBlockAssociation */ => {
let var_40 =
Some(
crate::xml_deser::deser_structure_vpc_ipv6_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association(var_40);
}
,
s if s.matches("cidrBlockAssociation") /* CidrBlockAssociation com.amazonaws.ec2#AssociateVpcCidrBlockOutput$CidrBlockAssociation */ => {
let var_41 =
Some(
crate::xml_deser::deser_structure_vpc_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_cidr_block_association(var_41);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#AssociateVpcCidrBlockOutput$VpcId */ => {
let var_42 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_42);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_attach_classic_link_vpc(
inp: &[u8],
mut builder: crate::output::attach_classic_link_vpc_output::Builder,
) -> Result<crate::output::attach_classic_link_vpc_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AttachClassicLinkVpcResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AttachClassicLinkVpcResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#AttachClassicLinkVpcOutput$Return */ => {
let var_43 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_43);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_attach_network_interface(
inp: &[u8],
mut builder: crate::output::attach_network_interface_output::Builder,
) -> Result<crate::output::attach_network_interface_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AttachNetworkInterfaceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AttachNetworkInterfaceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentId") /* AttachmentId com.amazonaws.ec2#AttachNetworkInterfaceOutput$AttachmentId */ => {
let var_44 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_attachment_id(var_44);
}
,
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#AttachNetworkInterfaceOutput$NetworkCardIndex */ => {
let var_45 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_network_card_index(var_45);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_attach_volume(
inp: &[u8],
mut builder: crate::output::attach_volume_output::Builder,
) -> Result<crate::output::attach_volume_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AttachVolumeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AttachVolumeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#AttachVolumeOutput$AttachTime */ => {
let var_46 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_46);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#AttachVolumeOutput$Device */ => {
let var_47 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device(var_47);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#AttachVolumeOutput$InstanceId */ => {
let var_48 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_48);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#AttachVolumeOutput$State */ => {
let var_49 =
Some(
Result::<crate::model::VolumeAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_49);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#AttachVolumeOutput$VolumeId */ => {
let var_50 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_50);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#AttachVolumeOutput$DeleteOnTermination */ => {
let var_51 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_51);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_attach_vpn_gateway(
inp: &[u8],
mut builder: crate::output::attach_vpn_gateway_output::Builder,
) -> Result<crate::output::attach_vpn_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AttachVpnGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AttachVpnGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachment") /* VpcAttachment com.amazonaws.ec2#AttachVpnGatewayOutput$VpcAttachment */ => {
let var_52 =
Some(
crate::xml_deser::deser_structure_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_vpc_attachment(var_52);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_authorize_client_vpn_ingress(
inp: &[u8],
mut builder: crate::output::authorize_client_vpn_ingress_output::Builder,
) -> Result<crate::output::authorize_client_vpn_ingress_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AuthorizeClientVpnIngressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AuthorizeClientVpnIngressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#AuthorizeClientVpnIngressOutput$Status */ => {
let var_53 =
Some(
crate::xml_deser::deser_structure_client_vpn_authorization_rule_status(&mut tag)
?
)
;
builder = builder.set_status(var_53);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_authorize_security_group_egress(
inp: &[u8],
mut builder: crate::output::authorize_security_group_egress_output::Builder,
) -> Result<
crate::output::authorize_security_group_egress_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AuthorizeSecurityGroupEgressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AuthorizeSecurityGroupEgressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#AuthorizeSecurityGroupEgressOutput$Return */ => {
let var_54 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_54);
}
,
s if s.matches("securityGroupRuleSet") /* SecurityGroupRules com.amazonaws.ec2#AuthorizeSecurityGroupEgressOutput$SecurityGroupRules */ => {
let var_55 =
Some(
crate::xml_deser::deser_list_security_group_rule_list(&mut tag)
?
)
;
builder = builder.set_security_group_rules(var_55);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_authorize_security_group_ingress(
inp: &[u8],
mut builder: crate::output::authorize_security_group_ingress_output::Builder,
) -> Result<
crate::output::authorize_security_group_ingress_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("AuthorizeSecurityGroupIngressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected AuthorizeSecurityGroupIngressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#AuthorizeSecurityGroupIngressOutput$Return */ => {
let var_56 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_56);
}
,
s if s.matches("securityGroupRuleSet") /* SecurityGroupRules com.amazonaws.ec2#AuthorizeSecurityGroupIngressOutput$SecurityGroupRules */ => {
let var_57 =
Some(
crate::xml_deser::deser_list_security_group_rule_list(&mut tag)
?
)
;
builder = builder.set_security_group_rules(var_57);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_bundle_instance(
inp: &[u8],
mut builder: crate::output::bundle_instance_output::Builder,
) -> Result<crate::output::bundle_instance_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("BundleInstanceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected BundleInstanceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bundleInstanceTask") /* BundleTask com.amazonaws.ec2#BundleInstanceOutput$BundleTask */ => {
let var_58 =
Some(
crate::xml_deser::deser_structure_bundle_task(&mut tag)
?
)
;
builder = builder.set_bundle_task(var_58);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_bundle_task(
inp: &[u8],
mut builder: crate::output::cancel_bundle_task_output::Builder,
) -> Result<crate::output::cancel_bundle_task_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelBundleTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelBundleTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bundleInstanceTask") /* BundleTask com.amazonaws.ec2#CancelBundleTaskOutput$BundleTask */ => {
let var_59 =
Some(
crate::xml_deser::deser_structure_bundle_task(&mut tag)
?
)
;
builder = builder.set_bundle_task(var_59);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_capacity_reservation(
inp: &[u8],
mut builder: crate::output::cancel_capacity_reservation_output::Builder,
) -> Result<crate::output::cancel_capacity_reservation_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelCapacityReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelCapacityReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#CancelCapacityReservationOutput$Return */ => {
let var_60 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_60);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_import_task(
inp: &[u8],
mut builder: crate::output::cancel_import_task_output::Builder,
) -> Result<crate::output::cancel_import_task_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelImportTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelImportTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("importTaskId") /* ImportTaskId com.amazonaws.ec2#CancelImportTaskOutput$ImportTaskId */ => {
let var_61 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_task_id(var_61);
}
,
s if s.matches("previousState") /* PreviousState com.amazonaws.ec2#CancelImportTaskOutput$PreviousState */ => {
let var_62 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_previous_state(var_62);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CancelImportTaskOutput$State */ => {
let var_63 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_63);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_reserved_instances_listing(
inp: &[u8],
mut builder: crate::output::cancel_reserved_instances_listing_output::Builder,
) -> Result<
crate::output::cancel_reserved_instances_listing_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelReservedInstancesListingResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelReservedInstancesListingResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesListingsSet") /* ReservedInstancesListings com.amazonaws.ec2#CancelReservedInstancesListingOutput$ReservedInstancesListings */ => {
let var_64 =
Some(
crate::xml_deser::deser_list_reserved_instances_listing_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances_listings(var_64);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_spot_fleet_requests(
inp: &[u8],
mut builder: crate::output::cancel_spot_fleet_requests_output::Builder,
) -> Result<crate::output::cancel_spot_fleet_requests_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelSpotFleetRequestsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelSpotFleetRequestsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successfulFleetRequestSet") /* SuccessfulFleetRequests com.amazonaws.ec2#CancelSpotFleetRequestsOutput$SuccessfulFleetRequests */ => {
let var_65 =
Some(
crate::xml_deser::deser_list_cancel_spot_fleet_requests_success_set(&mut tag)
?
)
;
builder = builder.set_successful_fleet_requests(var_65);
}
,
s if s.matches("unsuccessfulFleetRequestSet") /* UnsuccessfulFleetRequests com.amazonaws.ec2#CancelSpotFleetRequestsOutput$UnsuccessfulFleetRequests */ => {
let var_66 =
Some(
crate::xml_deser::deser_list_cancel_spot_fleet_requests_error_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful_fleet_requests(var_66);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_cancel_spot_instance_requests(
inp: &[u8],
mut builder: crate::output::cancel_spot_instance_requests_output::Builder,
) -> Result<
crate::output::cancel_spot_instance_requests_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CancelSpotInstanceRequestsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CancelSpotInstanceRequestsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotInstanceRequestSet") /* CancelledSpotInstanceRequests com.amazonaws.ec2#CancelSpotInstanceRequestsOutput$CancelledSpotInstanceRequests */ => {
let var_67 =
Some(
crate::xml_deser::deser_list_cancelled_spot_instance_request_list(&mut tag)
?
)
;
builder = builder.set_cancelled_spot_instance_requests(var_67);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_confirm_product_instance(
inp: &[u8],
mut builder: crate::output::confirm_product_instance_output::Builder,
) -> Result<crate::output::confirm_product_instance_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ConfirmProductInstanceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ConfirmProductInstanceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#ConfirmProductInstanceOutput$OwnerId */ => {
let var_68 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_68);
}
,
s if s.matches("return") /* Return com.amazonaws.ec2#ConfirmProductInstanceOutput$Return */ => {
let var_69 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_69);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_copy_fpga_image(
inp: &[u8],
mut builder: crate::output::copy_fpga_image_output::Builder,
) -> Result<crate::output::copy_fpga_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CopyFpgaImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CopyFpgaImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageId") /* FpgaImageId com.amazonaws.ec2#CopyFpgaImageOutput$FpgaImageId */ => {
let var_70 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_id(var_70);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_copy_image(
inp: &[u8],
mut builder: crate::output::copy_image_output::Builder,
) -> Result<crate::output::copy_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CopyImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CopyImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#CopyImageOutput$ImageId */ => {
let var_71 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_71);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_copy_snapshot(
inp: &[u8],
mut builder: crate::output::copy_snapshot_output::Builder,
) -> Result<crate::output::copy_snapshot_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CopySnapshotResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CopySnapshotResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#CopySnapshotOutput$SnapshotId */ => {
let var_72 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_72);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CopySnapshotOutput$Tags */ => {
let var_73 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_73);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_capacity_reservation(
inp: &[u8],
mut builder: crate::output::create_capacity_reservation_output::Builder,
) -> Result<crate::output::create_capacity_reservation_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateCapacityReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateCapacityReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservation") /* CapacityReservation com.amazonaws.ec2#CreateCapacityReservationOutput$CapacityReservation */ => {
let var_74 =
Some(
crate::xml_deser::deser_structure_capacity_reservation(&mut tag)
?
)
;
builder = builder.set_capacity_reservation(var_74);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_carrier_gateway(
inp: &[u8],
mut builder: crate::output::create_carrier_gateway_output::Builder,
) -> Result<crate::output::create_carrier_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateCarrierGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateCarrierGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("carrierGateway") /* CarrierGateway com.amazonaws.ec2#CreateCarrierGatewayOutput$CarrierGateway */ => {
let var_75 =
Some(
crate::xml_deser::deser_structure_carrier_gateway(&mut tag)
?
)
;
builder = builder.set_carrier_gateway(var_75);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_client_vpn_endpoint(
inp: &[u8],
mut builder: crate::output::create_client_vpn_endpoint_output::Builder,
) -> Result<crate::output::create_client_vpn_endpoint_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateClientVpnEndpointResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateClientVpnEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#CreateClientVpnEndpointOutput$ClientVpnEndpointId */ => {
let var_76 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_76);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#CreateClientVpnEndpointOutput$Status */ => {
let var_77 =
Some(
crate::xml_deser::deser_structure_client_vpn_endpoint_status(&mut tag)
?
)
;
builder = builder.set_status(var_77);
}
,
s if s.matches("dnsName") /* DnsName com.amazonaws.ec2#CreateClientVpnEndpointOutput$DnsName */ => {
let var_78 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dns_name(var_78);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_client_vpn_route(
inp: &[u8],
mut builder: crate::output::create_client_vpn_route_output::Builder,
) -> Result<crate::output::create_client_vpn_route_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateClientVpnRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateClientVpnRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#CreateClientVpnRouteOutput$Status */ => {
let var_79 =
Some(
crate::xml_deser::deser_structure_client_vpn_route_status(&mut tag)
?
)
;
builder = builder.set_status(var_79);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_customer_gateway(
inp: &[u8],
mut builder: crate::output::create_customer_gateway_output::Builder,
) -> Result<crate::output::create_customer_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateCustomerGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateCustomerGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("customerGateway") /* CustomerGateway com.amazonaws.ec2#CreateCustomerGatewayOutput$CustomerGateway */ => {
let var_80 =
Some(
crate::xml_deser::deser_structure_customer_gateway(&mut tag)
?
)
;
builder = builder.set_customer_gateway(var_80);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_default_subnet(
inp: &[u8],
mut builder: crate::output::create_default_subnet_output::Builder,
) -> Result<crate::output::create_default_subnet_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateDefaultSubnetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateDefaultSubnetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnet") /* Subnet com.amazonaws.ec2#CreateDefaultSubnetOutput$Subnet */ => {
let var_81 =
Some(
crate::xml_deser::deser_structure_subnet(&mut tag)
?
)
;
builder = builder.set_subnet(var_81);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_default_vpc(
inp: &[u8],
mut builder: crate::output::create_default_vpc_output::Builder,
) -> Result<crate::output::create_default_vpc_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateDefaultVpcResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateDefaultVpcResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpc") /* Vpc com.amazonaws.ec2#CreateDefaultVpcOutput$Vpc */ => {
let var_82 =
Some(
crate::xml_deser::deser_structure_vpc(&mut tag)
?
)
;
builder = builder.set_vpc(var_82);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_dhcp_options(
inp: &[u8],
mut builder: crate::output::create_dhcp_options_output::Builder,
) -> Result<crate::output::create_dhcp_options_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateDhcpOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateDhcpOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpOptions") /* DhcpOptions com.amazonaws.ec2#CreateDhcpOptionsOutput$DhcpOptions */ => {
let var_83 =
Some(
crate::xml_deser::deser_structure_dhcp_options(&mut tag)
?
)
;
builder = builder.set_dhcp_options(var_83);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_egress_only_internet_gateway(
inp: &[u8],
mut builder: crate::output::create_egress_only_internet_gateway_output::Builder,
) -> Result<
crate::output::create_egress_only_internet_gateway_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateEgressOnlyInternetGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateEgressOnlyInternetGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateEgressOnlyInternetGatewayOutput$ClientToken */ => {
let var_84 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_84);
}
,
s if s.matches("egressOnlyInternetGateway") /* EgressOnlyInternetGateway com.amazonaws.ec2#CreateEgressOnlyInternetGatewayOutput$EgressOnlyInternetGateway */ => {
let var_85 =
Some(
crate::xml_deser::deser_structure_egress_only_internet_gateway(&mut tag)
?
)
;
builder = builder.set_egress_only_internet_gateway(var_85);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_fleet(
inp: &[u8],
mut builder: crate::output::create_fleet_output::Builder,
) -> Result<crate::output::create_fleet_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateFleetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateFleetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#CreateFleetOutput$FleetId */ => {
let var_86 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_86);
}
,
s if s.matches("errorSet") /* Errors com.amazonaws.ec2#CreateFleetOutput$Errors */ => {
let var_87 =
Some(
crate::xml_deser::deser_list_create_fleet_errors_set(&mut tag)
?
)
;
builder = builder.set_errors(var_87);
}
,
s if s.matches("fleetInstanceSet") /* Instances com.amazonaws.ec2#CreateFleetOutput$Instances */ => {
let var_88 =
Some(
crate::xml_deser::deser_list_create_fleet_instances_set(&mut tag)
?
)
;
builder = builder.set_instances(var_88);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_flow_logs(
inp: &[u8],
mut builder: crate::output::create_flow_logs_output::Builder,
) -> Result<crate::output::create_flow_logs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateFlowLogsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateFlowLogsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateFlowLogsOutput$ClientToken */ => {
let var_89 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_89);
}
,
s if s.matches("flowLogIdSet") /* FlowLogIds com.amazonaws.ec2#CreateFlowLogsOutput$FlowLogIds */ => {
let var_90 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_flow_log_ids(var_90);
}
,
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#CreateFlowLogsOutput$Unsuccessful */ => {
let var_91 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_91);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_fpga_image(
inp: &[u8],
mut builder: crate::output::create_fpga_image_output::Builder,
) -> Result<crate::output::create_fpga_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateFpgaImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateFpgaImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageId") /* FpgaImageId com.amazonaws.ec2#CreateFpgaImageOutput$FpgaImageId */ => {
let var_92 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_id(var_92);
}
,
s if s.matches("fpgaImageGlobalId") /* FpgaImageGlobalId com.amazonaws.ec2#CreateFpgaImageOutput$FpgaImageGlobalId */ => {
let var_93 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_global_id(var_93);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_image(
inp: &[u8],
mut builder: crate::output::create_image_output::Builder,
) -> Result<crate::output::create_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#CreateImageOutput$ImageId */ => {
let var_94 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_94);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_instance_event_window(
inp: &[u8],
mut builder: crate::output::create_instance_event_window_output::Builder,
) -> Result<crate::output::create_instance_event_window_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateInstanceEventWindowResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateInstanceEventWindowResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindow") /* InstanceEventWindow com.amazonaws.ec2#CreateInstanceEventWindowOutput$InstanceEventWindow */ => {
let var_95 =
Some(
crate::xml_deser::deser_structure_instance_event_window(&mut tag)
?
)
;
builder = builder.set_instance_event_window(var_95);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_instance_export_task(
inp: &[u8],
mut builder: crate::output::create_instance_export_task_output::Builder,
) -> Result<crate::output::create_instance_export_task_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateInstanceExportTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateInstanceExportTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("exportTask") /* ExportTask com.amazonaws.ec2#CreateInstanceExportTaskOutput$ExportTask */ => {
let var_96 =
Some(
crate::xml_deser::deser_structure_export_task(&mut tag)
?
)
;
builder = builder.set_export_task(var_96);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_internet_gateway(
inp: &[u8],
mut builder: crate::output::create_internet_gateway_output::Builder,
) -> Result<crate::output::create_internet_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateInternetGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateInternetGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("internetGateway") /* InternetGateway com.amazonaws.ec2#CreateInternetGatewayOutput$InternetGateway */ => {
let var_97 =
Some(
crate::xml_deser::deser_structure_internet_gateway(&mut tag)
?
)
;
builder = builder.set_internet_gateway(var_97);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_key_pair(
inp: &[u8],
mut builder: crate::output::create_key_pair_output::Builder,
) -> Result<crate::output::create_key_pair_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateKeyPairResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateKeyPairResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("keyFingerprint") /* KeyFingerprint com.amazonaws.ec2#CreateKeyPairOutput$KeyFingerprint */ => {
let var_98 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_fingerprint(var_98);
}
,
s if s.matches("keyMaterial") /* KeyMaterial com.amazonaws.ec2#CreateKeyPairOutput$KeyMaterial */ => {
let var_99 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_material(var_99);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#CreateKeyPairOutput$KeyName */ => {
let var_100 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_100);
}
,
s if s.matches("keyPairId") /* KeyPairId com.amazonaws.ec2#CreateKeyPairOutput$KeyPairId */ => {
let var_101 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_pair_id(var_101);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CreateKeyPairOutput$Tags */ => {
let var_102 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_102);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_launch_template(
inp: &[u8],
mut builder: crate::output::create_launch_template_output::Builder,
) -> Result<crate::output::create_launch_template_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateLaunchTemplateResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateLaunchTemplateResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplate") /* LaunchTemplate com.amazonaws.ec2#CreateLaunchTemplateOutput$LaunchTemplate */ => {
let var_103 =
Some(
crate::xml_deser::deser_structure_launch_template(&mut tag)
?
)
;
builder = builder.set_launch_template(var_103);
}
,
s if s.matches("warning") /* Warning com.amazonaws.ec2#CreateLaunchTemplateOutput$Warning */ => {
let var_104 =
Some(
crate::xml_deser::deser_structure_validation_warning(&mut tag)
?
)
;
builder = builder.set_warning(var_104);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_launch_template_version(
inp: &[u8],
mut builder: crate::output::create_launch_template_version_output::Builder,
) -> Result<
crate::output::create_launch_template_version_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateLaunchTemplateVersionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateLaunchTemplateVersionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateVersion") /* LaunchTemplateVersion com.amazonaws.ec2#CreateLaunchTemplateVersionOutput$LaunchTemplateVersion */ => {
let var_105 =
Some(
crate::xml_deser::deser_structure_launch_template_version(&mut tag)
?
)
;
builder = builder.set_launch_template_version(var_105);
}
,
s if s.matches("warning") /* Warning com.amazonaws.ec2#CreateLaunchTemplateVersionOutput$Warning */ => {
let var_106 =
Some(
crate::xml_deser::deser_structure_validation_warning(&mut tag)
?
)
;
builder = builder.set_warning(var_106);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_local_gateway_route(
inp: &[u8],
mut builder: crate::output::create_local_gateway_route_output::Builder,
) -> Result<crate::output::create_local_gateway_route_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateLocalGatewayRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateLocalGatewayRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("route") /* Route com.amazonaws.ec2#CreateLocalGatewayRouteOutput$Route */ => {
let var_107 =
Some(
crate::xml_deser::deser_structure_local_gateway_route(&mut tag)
?
)
;
builder = builder.set_route(var_107);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_local_gateway_route_table_vpc_association(
inp: &[u8],
mut builder: crate::output::create_local_gateway_route_table_vpc_association_output::Builder,
) -> Result<
crate::output::create_local_gateway_route_table_vpc_association_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateLocalGatewayRouteTableVpcAssociationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateLocalGatewayRouteTableVpcAssociationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVpcAssociation") /* LocalGatewayRouteTableVpcAssociation com.amazonaws.ec2#CreateLocalGatewayRouteTableVpcAssociationOutput$LocalGatewayRouteTableVpcAssociation */ => {
let var_108 =
Some(
crate::xml_deser::deser_structure_local_gateway_route_table_vpc_association(&mut tag)
?
)
;
builder = builder.set_local_gateway_route_table_vpc_association(var_108);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_managed_prefix_list(
inp: &[u8],
mut builder: crate::output::create_managed_prefix_list_output::Builder,
) -> Result<crate::output::create_managed_prefix_list_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateManagedPrefixListResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateManagedPrefixListResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixList") /* PrefixList com.amazonaws.ec2#CreateManagedPrefixListOutput$PrefixList */ => {
let var_109 =
Some(
crate::xml_deser::deser_structure_managed_prefix_list(&mut tag)
?
)
;
builder = builder.set_prefix_list(var_109);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_nat_gateway(
inp: &[u8],
mut builder: crate::output::create_nat_gateway_output::Builder,
) -> Result<crate::output::create_nat_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateNatGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateNatGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateNatGatewayOutput$ClientToken */ => {
let var_110 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_110);
}
,
s if s.matches("natGateway") /* NatGateway com.amazonaws.ec2#CreateNatGatewayOutput$NatGateway */ => {
let var_111 =
Some(
crate::xml_deser::deser_structure_nat_gateway(&mut tag)
?
)
;
builder = builder.set_nat_gateway(var_111);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_network_acl(
inp: &[u8],
mut builder: crate::output::create_network_acl_output::Builder,
) -> Result<crate::output::create_network_acl_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateNetworkAclResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateNetworkAclResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkAcl") /* NetworkAcl com.amazonaws.ec2#CreateNetworkAclOutput$NetworkAcl */ => {
let var_112 =
Some(
crate::xml_deser::deser_structure_network_acl(&mut tag)
?
)
;
builder = builder.set_network_acl(var_112);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_network_insights_path(
inp: &[u8],
mut builder: crate::output::create_network_insights_path_output::Builder,
) -> Result<crate::output::create_network_insights_path_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateNetworkInsightsPathResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateNetworkInsightsPathResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsPath") /* NetworkInsightsPath com.amazonaws.ec2#CreateNetworkInsightsPathOutput$NetworkInsightsPath */ => {
let var_113 =
Some(
crate::xml_deser::deser_structure_network_insights_path(&mut tag)
?
)
;
builder = builder.set_network_insights_path(var_113);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_network_interface(
inp: &[u8],
mut builder: crate::output::create_network_interface_output::Builder,
) -> Result<crate::output::create_network_interface_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateNetworkInterfaceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateNetworkInterfaceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterface") /* NetworkInterface com.amazonaws.ec2#CreateNetworkInterfaceOutput$NetworkInterface */ => {
let var_114 =
Some(
crate::xml_deser::deser_structure_network_interface(&mut tag)
?
)
;
builder = builder.set_network_interface(var_114);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateNetworkInterfaceOutput$ClientToken */ => {
let var_115 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_115);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_network_interface_permission(
inp: &[u8],
mut builder: crate::output::create_network_interface_permission_output::Builder,
) -> Result<
crate::output::create_network_interface_permission_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateNetworkInterfacePermissionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateNetworkInterfacePermissionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("interfacePermission") /* InterfacePermission com.amazonaws.ec2#CreateNetworkInterfacePermissionOutput$InterfacePermission */ => {
let var_116 =
Some(
crate::xml_deser::deser_structure_network_interface_permission(&mut tag)
?
)
;
builder = builder.set_interface_permission(var_116);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_placement_group(
inp: &[u8],
mut builder: crate::output::create_placement_group_output::Builder,
) -> Result<crate::output::create_placement_group_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreatePlacementGroupResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreatePlacementGroupResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("placementGroup") /* PlacementGroup com.amazonaws.ec2#CreatePlacementGroupOutput$PlacementGroup */ => {
let var_117 =
Some(
crate::xml_deser::deser_structure_placement_group(&mut tag)
?
)
;
builder = builder.set_placement_group(var_117);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_replace_root_volume_task(
inp: &[u8],
mut builder: crate::output::create_replace_root_volume_task_output::Builder,
) -> Result<
crate::output::create_replace_root_volume_task_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateReplaceRootVolumeTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateReplaceRootVolumeTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("replaceRootVolumeTask") /* ReplaceRootVolumeTask com.amazonaws.ec2#CreateReplaceRootVolumeTaskOutput$ReplaceRootVolumeTask */ => {
let var_118 =
Some(
crate::xml_deser::deser_structure_replace_root_volume_task(&mut tag)
?
)
;
builder = builder.set_replace_root_volume_task(var_118);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_reserved_instances_listing(
inp: &[u8],
mut builder: crate::output::create_reserved_instances_listing_output::Builder,
) -> Result<
crate::output::create_reserved_instances_listing_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateReservedInstancesListingResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateReservedInstancesListingResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesListingsSet") /* ReservedInstancesListings com.amazonaws.ec2#CreateReservedInstancesListingOutput$ReservedInstancesListings */ => {
let var_119 =
Some(
crate::xml_deser::deser_list_reserved_instances_listing_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances_listings(var_119);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_restore_image_task(
inp: &[u8],
mut builder: crate::output::create_restore_image_task_output::Builder,
) -> Result<crate::output::create_restore_image_task_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateRestoreImageTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateRestoreImageTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#CreateRestoreImageTaskOutput$ImageId */ => {
let var_120 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_120);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_route(
inp: &[u8],
mut builder: crate::output::create_route_output::Builder,
) -> Result<crate::output::create_route_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#CreateRouteOutput$Return */ => {
let var_121 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_121);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_route_table(
inp: &[u8],
mut builder: crate::output::create_route_table_output::Builder,
) -> Result<crate::output::create_route_table_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("routeTable") /* RouteTable com.amazonaws.ec2#CreateRouteTableOutput$RouteTable */ => {
let var_122 =
Some(
crate::xml_deser::deser_structure_route_table(&mut tag)
?
)
;
builder = builder.set_route_table(var_122);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_security_group(
inp: &[u8],
mut builder: crate::output::create_security_group_output::Builder,
) -> Result<crate::output::create_security_group_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSecurityGroupResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSecurityGroupResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#CreateSecurityGroupOutput$GroupId */ => {
let var_123 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_123);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CreateSecurityGroupOutput$Tags */ => {
let var_124 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_124);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_snapshot(
inp: &[u8],
mut builder: crate::output::create_snapshot_output::Builder,
) -> Result<crate::output::create_snapshot_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSnapshotResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSnapshotResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dataEncryptionKeyId") /* DataEncryptionKeyId com.amazonaws.ec2#CreateSnapshotOutput$DataEncryptionKeyId */ => {
let var_125 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_data_encryption_key_id(var_125);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#CreateSnapshotOutput$Description */ => {
let var_126 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_126);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#CreateSnapshotOutput$Encrypted */ => {
let var_127 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_127);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#CreateSnapshotOutput$KmsKeyId */ => {
let var_128 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_128);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CreateSnapshotOutput$OwnerId */ => {
let var_129 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_129);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#CreateSnapshotOutput$Progress */ => {
let var_130 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_130);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#CreateSnapshotOutput$SnapshotId */ => {
let var_131 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_131);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#CreateSnapshotOutput$StartTime */ => {
let var_132 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_132);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#CreateSnapshotOutput$State */ => {
let var_133 =
Some(
Result::<crate::model::SnapshotState, smithy_xml::decode::XmlError>::Ok(
crate::model::SnapshotState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_133);
}
,
s if s.matches("statusMessage") /* StateMessage com.amazonaws.ec2#CreateSnapshotOutput$StateMessage */ => {
let var_134 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_message(var_134);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#CreateSnapshotOutput$VolumeId */ => {
let var_135 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_135);
}
,
s if s.matches("volumeSize") /* VolumeSize com.amazonaws.ec2#CreateSnapshotOutput$VolumeSize */ => {
let var_136 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_volume_size(var_136);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#CreateSnapshotOutput$OwnerAlias */ => {
let var_137 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_137);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CreateSnapshotOutput$OutpostArn */ => {
let var_138 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_138);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CreateSnapshotOutput$Tags */ => {
let var_139 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_139);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_snapshots(
inp: &[u8],
mut builder: crate::output::create_snapshots_output::Builder,
) -> Result<crate::output::create_snapshots_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSnapshotsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSnapshotsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotSet") /* Snapshots com.amazonaws.ec2#CreateSnapshotsOutput$Snapshots */ => {
let var_140 =
Some(
crate::xml_deser::deser_list_snapshot_set(&mut tag)
?
)
;
builder = builder.set_snapshots(var_140);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_spot_datafeed_subscription(
inp: &[u8],
mut builder: crate::output::create_spot_datafeed_subscription_output::Builder,
) -> Result<
crate::output::create_spot_datafeed_subscription_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSpotDatafeedSubscriptionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSpotDatafeedSubscriptionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotDatafeedSubscription") /* SpotDatafeedSubscription com.amazonaws.ec2#CreateSpotDatafeedSubscriptionOutput$SpotDatafeedSubscription */ => {
let var_141 =
Some(
crate::xml_deser::deser_structure_spot_datafeed_subscription(&mut tag)
?
)
;
builder = builder.set_spot_datafeed_subscription(var_141);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_store_image_task(
inp: &[u8],
mut builder: crate::output::create_store_image_task_output::Builder,
) -> Result<crate::output::create_store_image_task_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateStoreImageTaskResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateStoreImageTaskResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("objectKey") /* ObjectKey com.amazonaws.ec2#CreateStoreImageTaskOutput$ObjectKey */ => {
let var_142 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_object_key(var_142);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_subnet(
inp: &[u8],
mut builder: crate::output::create_subnet_output::Builder,
) -> Result<crate::output::create_subnet_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSubnetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSubnetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnet") /* Subnet com.amazonaws.ec2#CreateSubnetOutput$Subnet */ => {
let var_143 =
Some(
crate::xml_deser::deser_structure_subnet(&mut tag)
?
)
;
builder = builder.set_subnet(var_143);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_subnet_cidr_reservation(
inp: &[u8],
mut builder: crate::output::create_subnet_cidr_reservation_output::Builder,
) -> Result<
crate::output::create_subnet_cidr_reservation_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateSubnetCidrReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateSubnetCidrReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnetCidrReservation") /* SubnetCidrReservation com.amazonaws.ec2#CreateSubnetCidrReservationOutput$SubnetCidrReservation */ => {
let var_144 =
Some(
crate::xml_deser::deser_structure_subnet_cidr_reservation(&mut tag)
?
)
;
builder = builder.set_subnet_cidr_reservation(var_144);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_traffic_mirror_filter(
inp: &[u8],
mut builder: crate::output::create_traffic_mirror_filter_output::Builder,
) -> Result<crate::output::create_traffic_mirror_filter_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTrafficMirrorFilterResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTrafficMirrorFilterResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilter") /* TrafficMirrorFilter com.amazonaws.ec2#CreateTrafficMirrorFilterOutput$TrafficMirrorFilter */ => {
let var_145 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_filter(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_filter(var_145);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateTrafficMirrorFilterOutput$ClientToken */ => {
let var_146 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_146);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_traffic_mirror_filter_rule(
inp: &[u8],
mut builder: crate::output::create_traffic_mirror_filter_rule_output::Builder,
) -> Result<
crate::output::create_traffic_mirror_filter_rule_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTrafficMirrorFilterRuleResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTrafficMirrorFilterRuleResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterRule") /* TrafficMirrorFilterRule com.amazonaws.ec2#CreateTrafficMirrorFilterRuleOutput$TrafficMirrorFilterRule */ => {
let var_147 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_filter_rule(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_filter_rule(var_147);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateTrafficMirrorFilterRuleOutput$ClientToken */ => {
let var_148 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_148);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_traffic_mirror_session(
inp: &[u8],
mut builder: crate::output::create_traffic_mirror_session_output::Builder,
) -> Result<
crate::output::create_traffic_mirror_session_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTrafficMirrorSessionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTrafficMirrorSessionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorSession") /* TrafficMirrorSession com.amazonaws.ec2#CreateTrafficMirrorSessionOutput$TrafficMirrorSession */ => {
let var_149 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_session(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_session(var_149);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateTrafficMirrorSessionOutput$ClientToken */ => {
let var_150 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_150);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_traffic_mirror_target(
inp: &[u8],
mut builder: crate::output::create_traffic_mirror_target_output::Builder,
) -> Result<crate::output::create_traffic_mirror_target_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTrafficMirrorTargetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTrafficMirrorTargetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorTarget") /* TrafficMirrorTarget com.amazonaws.ec2#CreateTrafficMirrorTargetOutput$TrafficMirrorTarget */ => {
let var_151 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_target(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_target(var_151);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateTrafficMirrorTargetOutput$ClientToken */ => {
let var_152 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_152);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_output::Builder,
) -> Result<crate::output::create_transit_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGateway") /* TransitGateway com.amazonaws.ec2#CreateTransitGatewayOutput$TransitGateway */ => {
let var_153 =
Some(
crate::xml_deser::deser_structure_transit_gateway(&mut tag)
?
)
;
builder = builder.set_transit_gateway(var_153);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_connect(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_connect_output::Builder,
) -> Result<
crate::output::create_transit_gateway_connect_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayConnectResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayConnectResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnect") /* TransitGatewayConnect com.amazonaws.ec2#CreateTransitGatewayConnectOutput$TransitGatewayConnect */ => {
let var_154 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connect(var_154);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_connect_peer(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_connect_peer_output::Builder,
) -> Result<
crate::output::create_transit_gateway_connect_peer_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayConnectPeerResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayConnectPeerResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnectPeer") /* TransitGatewayConnectPeer com.amazonaws.ec2#CreateTransitGatewayConnectPeerOutput$TransitGatewayConnectPeer */ => {
let var_155 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect_peer(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connect_peer(var_155);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_multicast_domain(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_multicast_domain_output::Builder,
) -> Result<
crate::output::create_transit_gateway_multicast_domain_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayMulticastDomainResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayMulticastDomainResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomain") /* TransitGatewayMulticastDomain com.amazonaws.ec2#CreateTransitGatewayMulticastDomainOutput$TransitGatewayMulticastDomain */ => {
let var_156 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain(&mut tag)
?
)
;
builder = builder.set_transit_gateway_multicast_domain(var_156);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_peering_attachment(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_peering_attachment_output::Builder,
) -> Result<
crate::output::create_transit_gateway_peering_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayPeeringAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayPeeringAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPeeringAttachment") /* TransitGatewayPeeringAttachment com.amazonaws.ec2#CreateTransitGatewayPeeringAttachmentOutput$TransitGatewayPeeringAttachment */ => {
let var_157 =
Some(
crate::xml_deser::deser_structure_transit_gateway_peering_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_peering_attachment(var_157);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_prefix_list_reference(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_prefix_list_reference_output::Builder,
) -> Result<
crate::output::create_transit_gateway_prefix_list_reference_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayPrefixListReferenceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayPrefixListReferenceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPrefixListReference") /* TransitGatewayPrefixListReference com.amazonaws.ec2#CreateTransitGatewayPrefixListReferenceOutput$TransitGatewayPrefixListReference */ => {
let var_158 =
Some(
crate::xml_deser::deser_structure_transit_gateway_prefix_list_reference(&mut tag)
?
)
;
builder = builder.set_transit_gateway_prefix_list_reference(var_158);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_route(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_route_output::Builder,
) -> Result<crate::output::create_transit_gateway_route_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("route") /* Route com.amazonaws.ec2#CreateTransitGatewayRouteOutput$Route */ => {
let var_159 =
Some(
crate::xml_deser::deser_structure_transit_gateway_route(&mut tag)
?
)
;
builder = builder.set_route(var_159);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_route_table(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_route_table_output::Builder,
) -> Result<
crate::output::create_transit_gateway_route_table_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTable") /* TransitGatewayRouteTable com.amazonaws.ec2#CreateTransitGatewayRouteTableOutput$TransitGatewayRouteTable */ => {
let var_160 =
Some(
crate::xml_deser::deser_structure_transit_gateway_route_table(&mut tag)
?
)
;
builder = builder.set_transit_gateway_route_table(var_160);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_transit_gateway_vpc_attachment(
inp: &[u8],
mut builder: crate::output::create_transit_gateway_vpc_attachment_output::Builder,
) -> Result<
crate::output::create_transit_gateway_vpc_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateTransitGatewayVpcAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateTransitGatewayVpcAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachment") /* TransitGatewayVpcAttachment com.amazonaws.ec2#CreateTransitGatewayVpcAttachmentOutput$TransitGatewayVpcAttachment */ => {
let var_161 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachment(var_161);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_volume(
inp: &[u8],
mut builder: crate::output::create_volume_output::Builder,
) -> Result<crate::output::create_volume_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVolumeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVolumeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentSet") /* Attachments com.amazonaws.ec2#CreateVolumeOutput$Attachments */ => {
let var_162 =
Some(
crate::xml_deser::deser_list_volume_attachment_list(&mut tag)
?
)
;
builder = builder.set_attachments(var_162);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CreateVolumeOutput$AvailabilityZone */ => {
let var_163 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_163);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#CreateVolumeOutput$CreateTime */ => {
let var_164 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_164);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#CreateVolumeOutput$Encrypted */ => {
let var_165 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_165);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#CreateVolumeOutput$KmsKeyId */ => {
let var_166 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_166);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CreateVolumeOutput$OutpostArn */ => {
let var_167 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_167);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#CreateVolumeOutput$Size */ => {
let var_168 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_size(var_168);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#CreateVolumeOutput$SnapshotId */ => {
let var_169 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_169);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#CreateVolumeOutput$State */ => {
let var_170 =
Some(
Result::<crate::model::VolumeState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_170);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#CreateVolumeOutput$VolumeId */ => {
let var_171 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_171);
}
,
s if s.matches("iops") /* Iops com.amazonaws.ec2#CreateVolumeOutput$Iops */ => {
let var_172 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_iops(var_172);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CreateVolumeOutput$Tags */ => {
let var_173 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_173);
}
,
s if s.matches("volumeType") /* VolumeType com.amazonaws.ec2#CreateVolumeOutput$VolumeType */ => {
let var_174 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_volume_type(var_174);
}
,
s if s.matches("fastRestored") /* FastRestored com.amazonaws.ec2#CreateVolumeOutput$FastRestored */ => {
let var_175 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_fast_restored(var_175);
}
,
s if s.matches("multiAttachEnabled") /* MultiAttachEnabled com.amazonaws.ec2#CreateVolumeOutput$MultiAttachEnabled */ => {
let var_176 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_multi_attach_enabled(var_176);
}
,
s if s.matches("throughput") /* Throughput com.amazonaws.ec2#CreateVolumeOutput$Throughput */ => {
let var_177 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_throughput(var_177);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpc(
inp: &[u8],
mut builder: crate::output::create_vpc_output::Builder,
) -> Result<crate::output::create_vpc_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpcResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpc") /* Vpc com.amazonaws.ec2#CreateVpcOutput$Vpc */ => {
let var_178 =
Some(
crate::xml_deser::deser_structure_vpc(&mut tag)
?
)
;
builder = builder.set_vpc(var_178);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpc_endpoint(
inp: &[u8],
mut builder: crate::output::create_vpc_endpoint_output::Builder,
) -> Result<crate::output::create_vpc_endpoint_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcEndpointResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpcEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpoint") /* VpcEndpoint com.amazonaws.ec2#CreateVpcEndpointOutput$VpcEndpoint */ => {
let var_179 =
Some(
crate::xml_deser::deser_structure_vpc_endpoint(&mut tag)
?
)
;
builder = builder.set_vpc_endpoint(var_179);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateVpcEndpointOutput$ClientToken */ => {
let var_180 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_180);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpc_endpoint_connection_notification(
inp: &[u8],
mut builder: crate::output::create_vpc_endpoint_connection_notification_output::Builder,
) -> Result<
crate::output::create_vpc_endpoint_connection_notification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcEndpointConnectionNotificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpcEndpointConnectionNotificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("connectionNotification") /* ConnectionNotification com.amazonaws.ec2#CreateVpcEndpointConnectionNotificationOutput$ConnectionNotification */ => {
let var_181 =
Some(
crate::xml_deser::deser_structure_connection_notification(&mut tag)
?
)
;
builder = builder.set_connection_notification(var_181);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateVpcEndpointConnectionNotificationOutput$ClientToken */ => {
let var_182 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_182);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpc_endpoint_service_configuration(
inp: &[u8],
mut builder: crate::output::create_vpc_endpoint_service_configuration_output::Builder,
) -> Result<
crate::output::create_vpc_endpoint_service_configuration_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcEndpointServiceConfigurationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpcEndpointServiceConfigurationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceConfiguration") /* ServiceConfiguration com.amazonaws.ec2#CreateVpcEndpointServiceConfigurationOutput$ServiceConfiguration */ => {
let var_183 =
Some(
crate::xml_deser::deser_structure_service_configuration(&mut tag)
?
)
;
builder = builder.set_service_configuration(var_183);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#CreateVpcEndpointServiceConfigurationOutput$ClientToken */ => {
let var_184 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_184);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpc_peering_connection(
inp: &[u8],
mut builder: crate::output::create_vpc_peering_connection_output::Builder,
) -> Result<
crate::output::create_vpc_peering_connection_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpcPeeringConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpcPeeringConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcPeeringConnection") /* VpcPeeringConnection com.amazonaws.ec2#CreateVpcPeeringConnectionOutput$VpcPeeringConnection */ => {
let var_185 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection(&mut tag)
?
)
;
builder = builder.set_vpc_peering_connection(var_185);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpn_connection(
inp: &[u8],
mut builder: crate::output::create_vpn_connection_output::Builder,
) -> Result<crate::output::create_vpn_connection_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpnConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpnConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#CreateVpnConnectionOutput$VpnConnection */ => {
let var_186 =
Some(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_186);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_create_vpn_gateway(
inp: &[u8],
mut builder: crate::output::create_vpn_gateway_output::Builder,
) -> Result<crate::output::create_vpn_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("CreateVpnGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected CreateVpnGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnGateway") /* VpnGateway com.amazonaws.ec2#CreateVpnGatewayOutput$VpnGateway */ => {
let var_187 =
Some(
crate::xml_deser::deser_structure_vpn_gateway(&mut tag)
?
)
;
builder = builder.set_vpn_gateway(var_187);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_carrier_gateway(
inp: &[u8],
mut builder: crate::output::delete_carrier_gateway_output::Builder,
) -> Result<crate::output::delete_carrier_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteCarrierGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteCarrierGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("carrierGateway") /* CarrierGateway com.amazonaws.ec2#DeleteCarrierGatewayOutput$CarrierGateway */ => {
let var_188 =
Some(
crate::xml_deser::deser_structure_carrier_gateway(&mut tag)
?
)
;
builder = builder.set_carrier_gateway(var_188);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_client_vpn_endpoint(
inp: &[u8],
mut builder: crate::output::delete_client_vpn_endpoint_output::Builder,
) -> Result<crate::output::delete_client_vpn_endpoint_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteClientVpnEndpointResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteClientVpnEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#DeleteClientVpnEndpointOutput$Status */ => {
let var_189 =
Some(
crate::xml_deser::deser_structure_client_vpn_endpoint_status(&mut tag)
?
)
;
builder = builder.set_status(var_189);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_client_vpn_route(
inp: &[u8],
mut builder: crate::output::delete_client_vpn_route_output::Builder,
) -> Result<crate::output::delete_client_vpn_route_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteClientVpnRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteClientVpnRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#DeleteClientVpnRouteOutput$Status */ => {
let var_190 =
Some(
crate::xml_deser::deser_structure_client_vpn_route_status(&mut tag)
?
)
;
builder = builder.set_status(var_190);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_egress_only_internet_gateway(
inp: &[u8],
mut builder: crate::output::delete_egress_only_internet_gateway_output::Builder,
) -> Result<
crate::output::delete_egress_only_internet_gateway_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteEgressOnlyInternetGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteEgressOnlyInternetGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("returnCode") /* ReturnCode com.amazonaws.ec2#DeleteEgressOnlyInternetGatewayOutput$ReturnCode */ => {
let var_191 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return_code(var_191);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_fleets(
inp: &[u8],
mut builder: crate::output::delete_fleets_output::Builder,
) -> Result<crate::output::delete_fleets_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteFleetsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteFleetsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successfulFleetDeletionSet") /* SuccessfulFleetDeletions com.amazonaws.ec2#DeleteFleetsOutput$SuccessfulFleetDeletions */ => {
let var_192 =
Some(
crate::xml_deser::deser_list_delete_fleet_success_set(&mut tag)
?
)
;
builder = builder.set_successful_fleet_deletions(var_192);
}
,
s if s.matches("unsuccessfulFleetDeletionSet") /* UnsuccessfulFleetDeletions com.amazonaws.ec2#DeleteFleetsOutput$UnsuccessfulFleetDeletions */ => {
let var_193 =
Some(
crate::xml_deser::deser_list_delete_fleet_error_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful_fleet_deletions(var_193);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_flow_logs(
inp: &[u8],
mut builder: crate::output::delete_flow_logs_output::Builder,
) -> Result<crate::output::delete_flow_logs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteFlowLogsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteFlowLogsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#DeleteFlowLogsOutput$Unsuccessful */ => {
let var_194 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_194);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_fpga_image(
inp: &[u8],
mut builder: crate::output::delete_fpga_image_output::Builder,
) -> Result<crate::output::delete_fpga_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteFpgaImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteFpgaImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DeleteFpgaImageOutput$Return */ => {
let var_195 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_195);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_instance_event_window(
inp: &[u8],
mut builder: crate::output::delete_instance_event_window_output::Builder,
) -> Result<crate::output::delete_instance_event_window_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteInstanceEventWindowResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteInstanceEventWindowResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindowState") /* InstanceEventWindowState com.amazonaws.ec2#DeleteInstanceEventWindowOutput$InstanceEventWindowState */ => {
let var_196 =
Some(
crate::xml_deser::deser_structure_instance_event_window_state_change(&mut tag)
?
)
;
builder = builder.set_instance_event_window_state(var_196);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_launch_template(
inp: &[u8],
mut builder: crate::output::delete_launch_template_output::Builder,
) -> Result<crate::output::delete_launch_template_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteLaunchTemplateResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteLaunchTemplateResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplate") /* LaunchTemplate com.amazonaws.ec2#DeleteLaunchTemplateOutput$LaunchTemplate */ => {
let var_197 =
Some(
crate::xml_deser::deser_structure_launch_template(&mut tag)
?
)
;
builder = builder.set_launch_template(var_197);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_launch_template_versions(
inp: &[u8],
mut builder: crate::output::delete_launch_template_versions_output::Builder,
) -> Result<
crate::output::delete_launch_template_versions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteLaunchTemplateVersionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteLaunchTemplateVersionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successfullyDeletedLaunchTemplateVersionSet") /* SuccessfullyDeletedLaunchTemplateVersions com.amazonaws.ec2#DeleteLaunchTemplateVersionsOutput$SuccessfullyDeletedLaunchTemplateVersions */ => {
let var_198 =
Some(
crate::xml_deser::deser_list_delete_launch_template_versions_response_success_set(&mut tag)
?
)
;
builder = builder.set_successfully_deleted_launch_template_versions(var_198);
}
,
s if s.matches("unsuccessfullyDeletedLaunchTemplateVersionSet") /* UnsuccessfullyDeletedLaunchTemplateVersions com.amazonaws.ec2#DeleteLaunchTemplateVersionsOutput$UnsuccessfullyDeletedLaunchTemplateVersions */ => {
let var_199 =
Some(
crate::xml_deser::deser_list_delete_launch_template_versions_response_error_set(&mut tag)
?
)
;
builder = builder.set_unsuccessfully_deleted_launch_template_versions(var_199);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_local_gateway_route(
inp: &[u8],
mut builder: crate::output::delete_local_gateway_route_output::Builder,
) -> Result<crate::output::delete_local_gateway_route_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteLocalGatewayRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteLocalGatewayRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("route") /* Route com.amazonaws.ec2#DeleteLocalGatewayRouteOutput$Route */ => {
let var_200 =
Some(
crate::xml_deser::deser_structure_local_gateway_route(&mut tag)
?
)
;
builder = builder.set_route(var_200);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_local_gateway_route_table_vpc_association(
inp: &[u8],
mut builder: crate::output::delete_local_gateway_route_table_vpc_association_output::Builder,
) -> Result<
crate::output::delete_local_gateway_route_table_vpc_association_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteLocalGatewayRouteTableVpcAssociationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteLocalGatewayRouteTableVpcAssociationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVpcAssociation") /* LocalGatewayRouteTableVpcAssociation com.amazonaws.ec2#DeleteLocalGatewayRouteTableVpcAssociationOutput$LocalGatewayRouteTableVpcAssociation */ => {
let var_201 =
Some(
crate::xml_deser::deser_structure_local_gateway_route_table_vpc_association(&mut tag)
?
)
;
builder = builder.set_local_gateway_route_table_vpc_association(var_201);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_managed_prefix_list(
inp: &[u8],
mut builder: crate::output::delete_managed_prefix_list_output::Builder,
) -> Result<crate::output::delete_managed_prefix_list_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteManagedPrefixListResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteManagedPrefixListResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixList") /* PrefixList com.amazonaws.ec2#DeleteManagedPrefixListOutput$PrefixList */ => {
let var_202 =
Some(
crate::xml_deser::deser_structure_managed_prefix_list(&mut tag)
?
)
;
builder = builder.set_prefix_list(var_202);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_nat_gateway(
inp: &[u8],
mut builder: crate::output::delete_nat_gateway_output::Builder,
) -> Result<crate::output::delete_nat_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteNatGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteNatGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("natGatewayId") /* NatGatewayId com.amazonaws.ec2#DeleteNatGatewayOutput$NatGatewayId */ => {
let var_203 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_nat_gateway_id(var_203);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_network_insights_analysis(
inp: &[u8],
mut builder: crate::output::delete_network_insights_analysis_output::Builder,
) -> Result<
crate::output::delete_network_insights_analysis_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteNetworkInsightsAnalysisResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteNetworkInsightsAnalysisResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsAnalysisId") /* NetworkInsightsAnalysisId com.amazonaws.ec2#DeleteNetworkInsightsAnalysisOutput$NetworkInsightsAnalysisId */ => {
let var_204 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_analysis_id(var_204);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_network_insights_path(
inp: &[u8],
mut builder: crate::output::delete_network_insights_path_output::Builder,
) -> Result<crate::output::delete_network_insights_path_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteNetworkInsightsPathResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteNetworkInsightsPathResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsPathId") /* NetworkInsightsPathId com.amazonaws.ec2#DeleteNetworkInsightsPathOutput$NetworkInsightsPathId */ => {
let var_205 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_path_id(var_205);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_network_interface_permission(
inp: &[u8],
mut builder: crate::output::delete_network_interface_permission_output::Builder,
) -> Result<
crate::output::delete_network_interface_permission_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteNetworkInterfacePermissionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteNetworkInterfacePermissionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DeleteNetworkInterfacePermissionOutput$Return */ => {
let var_206 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_206);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_queued_reserved_instances(
inp: &[u8],
mut builder: crate::output::delete_queued_reserved_instances_output::Builder,
) -> Result<
crate::output::delete_queued_reserved_instances_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteQueuedReservedInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteQueuedReservedInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successfulQueuedPurchaseDeletionSet") /* SuccessfulQueuedPurchaseDeletions com.amazonaws.ec2#DeleteQueuedReservedInstancesOutput$SuccessfulQueuedPurchaseDeletions */ => {
let var_207 =
Some(
crate::xml_deser::deser_list_successful_queued_purchase_deletion_set(&mut tag)
?
)
;
builder = builder.set_successful_queued_purchase_deletions(var_207);
}
,
s if s.matches("failedQueuedPurchaseDeletionSet") /* FailedQueuedPurchaseDeletions com.amazonaws.ec2#DeleteQueuedReservedInstancesOutput$FailedQueuedPurchaseDeletions */ => {
let var_208 =
Some(
crate::xml_deser::deser_list_failed_queued_purchase_deletion_set(&mut tag)
?
)
;
builder = builder.set_failed_queued_purchase_deletions(var_208);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_subnet_cidr_reservation(
inp: &[u8],
mut builder: crate::output::delete_subnet_cidr_reservation_output::Builder,
) -> Result<
crate::output::delete_subnet_cidr_reservation_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteSubnetCidrReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteSubnetCidrReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deletedSubnetCidrReservation") /* DeletedSubnetCidrReservation com.amazonaws.ec2#DeleteSubnetCidrReservationOutput$DeletedSubnetCidrReservation */ => {
let var_209 =
Some(
crate::xml_deser::deser_structure_subnet_cidr_reservation(&mut tag)
?
)
;
builder = builder.set_deleted_subnet_cidr_reservation(var_209);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_traffic_mirror_filter(
inp: &[u8],
mut builder: crate::output::delete_traffic_mirror_filter_output::Builder,
) -> Result<crate::output::delete_traffic_mirror_filter_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTrafficMirrorFilterResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTrafficMirrorFilterResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#DeleteTrafficMirrorFilterOutput$TrafficMirrorFilterId */ => {
let var_210 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_id(var_210);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_traffic_mirror_filter_rule(
inp: &[u8],
mut builder: crate::output::delete_traffic_mirror_filter_rule_output::Builder,
) -> Result<
crate::output::delete_traffic_mirror_filter_rule_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTrafficMirrorFilterRuleResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTrafficMirrorFilterRuleResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterRuleId") /* TrafficMirrorFilterRuleId com.amazonaws.ec2#DeleteTrafficMirrorFilterRuleOutput$TrafficMirrorFilterRuleId */ => {
let var_211 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_rule_id(var_211);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_traffic_mirror_session(
inp: &[u8],
mut builder: crate::output::delete_traffic_mirror_session_output::Builder,
) -> Result<
crate::output::delete_traffic_mirror_session_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTrafficMirrorSessionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTrafficMirrorSessionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorSessionId") /* TrafficMirrorSessionId com.amazonaws.ec2#DeleteTrafficMirrorSessionOutput$TrafficMirrorSessionId */ => {
let var_212 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_session_id(var_212);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_traffic_mirror_target(
inp: &[u8],
mut builder: crate::output::delete_traffic_mirror_target_output::Builder,
) -> Result<crate::output::delete_traffic_mirror_target_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTrafficMirrorTargetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTrafficMirrorTargetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorTargetId") /* TrafficMirrorTargetId com.amazonaws.ec2#DeleteTrafficMirrorTargetOutput$TrafficMirrorTargetId */ => {
let var_213 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_target_id(var_213);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_output::Builder,
) -> Result<crate::output::delete_transit_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGateway") /* TransitGateway com.amazonaws.ec2#DeleteTransitGatewayOutput$TransitGateway */ => {
let var_214 =
Some(
crate::xml_deser::deser_structure_transit_gateway(&mut tag)
?
)
;
builder = builder.set_transit_gateway(var_214);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_connect(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_connect_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_connect_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayConnectResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayConnectResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnect") /* TransitGatewayConnect com.amazonaws.ec2#DeleteTransitGatewayConnectOutput$TransitGatewayConnect */ => {
let var_215 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connect(var_215);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_connect_peer(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_connect_peer_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_connect_peer_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayConnectPeerResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayConnectPeerResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnectPeer") /* TransitGatewayConnectPeer com.amazonaws.ec2#DeleteTransitGatewayConnectPeerOutput$TransitGatewayConnectPeer */ => {
let var_216 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect_peer(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connect_peer(var_216);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_multicast_domain(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_multicast_domain_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_multicast_domain_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayMulticastDomainResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayMulticastDomainResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomain") /* TransitGatewayMulticastDomain com.amazonaws.ec2#DeleteTransitGatewayMulticastDomainOutput$TransitGatewayMulticastDomain */ => {
let var_217 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain(&mut tag)
?
)
;
builder = builder.set_transit_gateway_multicast_domain(var_217);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_peering_attachment(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_peering_attachment_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_peering_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayPeeringAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayPeeringAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPeeringAttachment") /* TransitGatewayPeeringAttachment com.amazonaws.ec2#DeleteTransitGatewayPeeringAttachmentOutput$TransitGatewayPeeringAttachment */ => {
let var_218 =
Some(
crate::xml_deser::deser_structure_transit_gateway_peering_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_peering_attachment(var_218);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_prefix_list_reference(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_prefix_list_reference_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_prefix_list_reference_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayPrefixListReferenceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayPrefixListReferenceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPrefixListReference") /* TransitGatewayPrefixListReference com.amazonaws.ec2#DeleteTransitGatewayPrefixListReferenceOutput$TransitGatewayPrefixListReference */ => {
let var_219 =
Some(
crate::xml_deser::deser_structure_transit_gateway_prefix_list_reference(&mut tag)
?
)
;
builder = builder.set_transit_gateway_prefix_list_reference(var_219);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_route(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_route_output::Builder,
) -> Result<crate::output::delete_transit_gateway_route_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("route") /* Route com.amazonaws.ec2#DeleteTransitGatewayRouteOutput$Route */ => {
let var_220 =
Some(
crate::xml_deser::deser_structure_transit_gateway_route(&mut tag)
?
)
;
builder = builder.set_route(var_220);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_route_table(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_route_table_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_route_table_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTable") /* TransitGatewayRouteTable com.amazonaws.ec2#DeleteTransitGatewayRouteTableOutput$TransitGatewayRouteTable */ => {
let var_221 =
Some(
crate::xml_deser::deser_structure_transit_gateway_route_table(&mut tag)
?
)
;
builder = builder.set_transit_gateway_route_table(var_221);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_transit_gateway_vpc_attachment(
inp: &[u8],
mut builder: crate::output::delete_transit_gateway_vpc_attachment_output::Builder,
) -> Result<
crate::output::delete_transit_gateway_vpc_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteTransitGatewayVpcAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteTransitGatewayVpcAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachment") /* TransitGatewayVpcAttachment com.amazonaws.ec2#DeleteTransitGatewayVpcAttachmentOutput$TransitGatewayVpcAttachment */ => {
let var_222 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachment(var_222);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_vpc_endpoint_connection_notifications(
inp: &[u8],
mut builder: crate::output::delete_vpc_endpoint_connection_notifications_output::Builder,
) -> Result<
crate::output::delete_vpc_endpoint_connection_notifications_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteVpcEndpointConnectionNotificationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteVpcEndpointConnectionNotificationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#DeleteVpcEndpointConnectionNotificationsOutput$Unsuccessful */ => {
let var_223 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_223);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_vpc_endpoints(
inp: &[u8],
mut builder: crate::output::delete_vpc_endpoints_output::Builder,
) -> Result<crate::output::delete_vpc_endpoints_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteVpcEndpointsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteVpcEndpointsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#DeleteVpcEndpointsOutput$Unsuccessful */ => {
let var_224 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_224);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_vpc_endpoint_service_configurations(
inp: &[u8],
mut builder: crate::output::delete_vpc_endpoint_service_configurations_output::Builder,
) -> Result<
crate::output::delete_vpc_endpoint_service_configurations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteVpcEndpointServiceConfigurationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteVpcEndpointServiceConfigurationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#DeleteVpcEndpointServiceConfigurationsOutput$Unsuccessful */ => {
let var_225 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_225);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_delete_vpc_peering_connection(
inp: &[u8],
mut builder: crate::output::delete_vpc_peering_connection_output::Builder,
) -> Result<
crate::output::delete_vpc_peering_connection_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeleteVpcPeeringConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeleteVpcPeeringConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DeleteVpcPeeringConnectionOutput$Return */ => {
let var_226 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_226);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_deprovision_byoip_cidr(
inp: &[u8],
mut builder: crate::output::deprovision_byoip_cidr_output::Builder,
) -> Result<crate::output::deprovision_byoip_cidr_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeprovisionByoipCidrResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeprovisionByoipCidrResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("byoipCidr") /* ByoipCidr com.amazonaws.ec2#DeprovisionByoipCidrOutput$ByoipCidr */ => {
let var_227 =
Some(
crate::xml_deser::deser_structure_byoip_cidr(&mut tag)
?
)
;
builder = builder.set_byoip_cidr(var_227);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_deregister_instance_event_notification_attributes(
inp: &[u8],
mut builder: crate::output::deregister_instance_event_notification_attributes_output::Builder,
) -> Result<
crate::output::deregister_instance_event_notification_attributes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeregisterInstanceEventNotificationAttributesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeregisterInstanceEventNotificationAttributesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTagAttribute") /* InstanceTagAttribute com.amazonaws.ec2#DeregisterInstanceEventNotificationAttributesOutput$InstanceTagAttribute */ => {
let var_228 =
Some(
crate::xml_deser::deser_structure_instance_tag_notification_attribute(&mut tag)
?
)
;
builder = builder.set_instance_tag_attribute(var_228);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_deregister_transit_gateway_multicast_group_members(
inp: &[u8],
mut builder: crate::output::deregister_transit_gateway_multicast_group_members_output::Builder,
) -> Result<
crate::output::deregister_transit_gateway_multicast_group_members_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeregisterTransitGatewayMulticastGroupMembersResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeregisterTransitGatewayMulticastGroupMembersResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deregisteredMulticastGroupMembers") /* DeregisteredMulticastGroupMembers com.amazonaws.ec2#DeregisterTransitGatewayMulticastGroupMembersOutput$DeregisteredMulticastGroupMembers */ => {
let var_229 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_deregistered_group_members(&mut tag)
?
)
;
builder = builder.set_deregistered_multicast_group_members(var_229);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_deregister_transit_gateway_multicast_group_sources(
inp: &[u8],
mut builder: crate::output::deregister_transit_gateway_multicast_group_sources_output::Builder,
) -> Result<
crate::output::deregister_transit_gateway_multicast_group_sources_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DeregisterTransitGatewayMulticastGroupSourcesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DeregisterTransitGatewayMulticastGroupSourcesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deregisteredMulticastGroupSources") /* DeregisteredMulticastGroupSources com.amazonaws.ec2#DeregisterTransitGatewayMulticastGroupSourcesOutput$DeregisteredMulticastGroupSources */ => {
let var_230 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_deregistered_group_sources(&mut tag)
?
)
;
builder = builder.set_deregistered_multicast_group_sources(var_230);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_account_attributes(
inp: &[u8],
mut builder: crate::output::describe_account_attributes_output::Builder,
) -> Result<crate::output::describe_account_attributes_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAccountAttributesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeAccountAttributesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accountAttributeSet") /* AccountAttributes com.amazonaws.ec2#DescribeAccountAttributesOutput$AccountAttributes */ => {
let var_231 =
Some(
crate::xml_deser::deser_list_account_attribute_list(&mut tag)
?
)
;
builder = builder.set_account_attributes(var_231);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_addresses(
inp: &[u8],
mut builder: crate::output::describe_addresses_output::Builder,
) -> Result<crate::output::describe_addresses_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAddressesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeAddressesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("addressesSet") /* Addresses com.amazonaws.ec2#DescribeAddressesOutput$Addresses */ => {
let var_232 =
Some(
crate::xml_deser::deser_list_address_list(&mut tag)
?
)
;
builder = builder.set_addresses(var_232);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_addresses_attribute(
inp: &[u8],
mut builder: crate::output::describe_addresses_attribute_output::Builder,
) -> Result<crate::output::describe_addresses_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAddressesAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeAddressesAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("addressSet") /* Addresses com.amazonaws.ec2#DescribeAddressesAttributeOutput$Addresses */ => {
let var_233 =
Some(
crate::xml_deser::deser_list_address_set(&mut tag)
?
)
;
builder = builder.set_addresses(var_233);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeAddressesAttributeOutput$NextToken */ => {
let var_234 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_234);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_aggregate_id_format(
inp: &[u8],
mut builder: crate::output::describe_aggregate_id_format_output::Builder,
) -> Result<crate::output::describe_aggregate_id_format_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAggregateIdFormatResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeAggregateIdFormatResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("useLongIdsAggregated") /* UseLongIdsAggregated com.amazonaws.ec2#DescribeAggregateIdFormatOutput$UseLongIdsAggregated */ => {
let var_235 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_use_long_ids_aggregated(var_235);
}
,
s if s.matches("statusSet") /* Statuses com.amazonaws.ec2#DescribeAggregateIdFormatOutput$Statuses */ => {
let var_236 =
Some(
crate::xml_deser::deser_list_id_format_list(&mut tag)
?
)
;
builder = builder.set_statuses(var_236);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_availability_zones(
inp: &[u8],
mut builder: crate::output::describe_availability_zones_output::Builder,
) -> Result<crate::output::describe_availability_zones_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeAvailabilityZonesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeAvailabilityZonesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZoneInfo") /* AvailabilityZones com.amazonaws.ec2#DescribeAvailabilityZonesOutput$AvailabilityZones */ => {
let var_237 =
Some(
crate::xml_deser::deser_list_availability_zone_list(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_237);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_bundle_tasks(
inp: &[u8],
mut builder: crate::output::describe_bundle_tasks_output::Builder,
) -> Result<crate::output::describe_bundle_tasks_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeBundleTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeBundleTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bundleInstanceTasksSet") /* BundleTasks com.amazonaws.ec2#DescribeBundleTasksOutput$BundleTasks */ => {
let var_238 =
Some(
crate::xml_deser::deser_list_bundle_task_list(&mut tag)
?
)
;
builder = builder.set_bundle_tasks(var_238);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_byoip_cidrs(
inp: &[u8],
mut builder: crate::output::describe_byoip_cidrs_output::Builder,
) -> Result<crate::output::describe_byoip_cidrs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeByoipCidrsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeByoipCidrsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("byoipCidrSet") /* ByoipCidrs com.amazonaws.ec2#DescribeByoipCidrsOutput$ByoipCidrs */ => {
let var_239 =
Some(
crate::xml_deser::deser_list_byoip_cidr_set(&mut tag)
?
)
;
builder = builder.set_byoip_cidrs(var_239);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeByoipCidrsOutput$NextToken */ => {
let var_240 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_240);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_capacity_reservations(
inp: &[u8],
mut builder: crate::output::describe_capacity_reservations_output::Builder,
) -> Result<
crate::output::describe_capacity_reservations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeCapacityReservationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeCapacityReservationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeCapacityReservationsOutput$NextToken */ => {
let var_241 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_241);
}
,
s if s.matches("capacityReservationSet") /* CapacityReservations com.amazonaws.ec2#DescribeCapacityReservationsOutput$CapacityReservations */ => {
let var_242 =
Some(
crate::xml_deser::deser_list_capacity_reservation_set(&mut tag)
?
)
;
builder = builder.set_capacity_reservations(var_242);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_carrier_gateways(
inp: &[u8],
mut builder: crate::output::describe_carrier_gateways_output::Builder,
) -> Result<crate::output::describe_carrier_gateways_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeCarrierGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeCarrierGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("carrierGatewaySet") /* CarrierGateways com.amazonaws.ec2#DescribeCarrierGatewaysOutput$CarrierGateways */ => {
let var_243 =
Some(
crate::xml_deser::deser_list_carrier_gateway_set(&mut tag)
?
)
;
builder = builder.set_carrier_gateways(var_243);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeCarrierGatewaysOutput$NextToken */ => {
let var_244 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_244);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_classic_link_instances(
inp: &[u8],
mut builder: crate::output::describe_classic_link_instances_output::Builder,
) -> Result<
crate::output::describe_classic_link_instances_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClassicLinkInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClassicLinkInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#DescribeClassicLinkInstancesOutput$Instances */ => {
let var_245 =
Some(
crate::xml_deser::deser_list_classic_link_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_245);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClassicLinkInstancesOutput$NextToken */ => {
let var_246 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_246);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_client_vpn_authorization_rules(
inp: &[u8],
mut builder: crate::output::describe_client_vpn_authorization_rules_output::Builder,
) -> Result<
crate::output::describe_client_vpn_authorization_rules_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClientVpnAuthorizationRulesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClientVpnAuthorizationRulesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("authorizationRule") /* AuthorizationRules com.amazonaws.ec2#DescribeClientVpnAuthorizationRulesOutput$AuthorizationRules */ => {
let var_247 =
Some(
crate::xml_deser::deser_list_authorization_rule_set(&mut tag)
?
)
;
builder = builder.set_authorization_rules(var_247);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClientVpnAuthorizationRulesOutput$NextToken */ => {
let var_248 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_248);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_client_vpn_connections(
inp: &[u8],
mut builder: crate::output::describe_client_vpn_connections_output::Builder,
) -> Result<
crate::output::describe_client_vpn_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClientVpnConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClientVpnConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("connections") /* Connections com.amazonaws.ec2#DescribeClientVpnConnectionsOutput$Connections */ => {
let var_249 =
Some(
crate::xml_deser::deser_list_client_vpn_connection_set(&mut tag)
?
)
;
builder = builder.set_connections(var_249);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClientVpnConnectionsOutput$NextToken */ => {
let var_250 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_250);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_client_vpn_endpoints(
inp: &[u8],
mut builder: crate::output::describe_client_vpn_endpoints_output::Builder,
) -> Result<
crate::output::describe_client_vpn_endpoints_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClientVpnEndpointsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClientVpnEndpointsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpoint") /* ClientVpnEndpoints com.amazonaws.ec2#DescribeClientVpnEndpointsOutput$ClientVpnEndpoints */ => {
let var_251 =
Some(
crate::xml_deser::deser_list_endpoint_set(&mut tag)
?
)
;
builder = builder.set_client_vpn_endpoints(var_251);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClientVpnEndpointsOutput$NextToken */ => {
let var_252 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_252);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_client_vpn_routes(
inp: &[u8],
mut builder: crate::output::describe_client_vpn_routes_output::Builder,
) -> Result<crate::output::describe_client_vpn_routes_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClientVpnRoutesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClientVpnRoutesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("routes") /* Routes com.amazonaws.ec2#DescribeClientVpnRoutesOutput$Routes */ => {
let var_253 =
Some(
crate::xml_deser::deser_list_client_vpn_route_set(&mut tag)
?
)
;
builder = builder.set_routes(var_253);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClientVpnRoutesOutput$NextToken */ => {
let var_254 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_254);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_client_vpn_target_networks(
inp: &[u8],
mut builder: crate::output::describe_client_vpn_target_networks_output::Builder,
) -> Result<
crate::output::describe_client_vpn_target_networks_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeClientVpnTargetNetworksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeClientVpnTargetNetworksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnTargetNetworks") /* ClientVpnTargetNetworks com.amazonaws.ec2#DescribeClientVpnTargetNetworksOutput$ClientVpnTargetNetworks */ => {
let var_255 =
Some(
crate::xml_deser::deser_list_target_network_set(&mut tag)
?
)
;
builder = builder.set_client_vpn_target_networks(var_255);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeClientVpnTargetNetworksOutput$NextToken */ => {
let var_256 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_256);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_coip_pools(
inp: &[u8],
mut builder: crate::output::describe_coip_pools_output::Builder,
) -> Result<crate::output::describe_coip_pools_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeCoipPoolsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeCoipPoolsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coipPoolSet") /* CoipPools com.amazonaws.ec2#DescribeCoipPoolsOutput$CoipPools */ => {
let var_257 =
Some(
crate::xml_deser::deser_list_coip_pool_set(&mut tag)
?
)
;
builder = builder.set_coip_pools(var_257);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeCoipPoolsOutput$NextToken */ => {
let var_258 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_258);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_conversion_tasks(
inp: &[u8],
mut builder: crate::output::describe_conversion_tasks_output::Builder,
) -> Result<crate::output::describe_conversion_tasks_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeConversionTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeConversionTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("conversionTasks") /* ConversionTasks com.amazonaws.ec2#DescribeConversionTasksOutput$ConversionTasks */ => {
let var_259 =
Some(
crate::xml_deser::deser_list_describe_conversion_task_list(&mut tag)
?
)
;
builder = builder.set_conversion_tasks(var_259);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_customer_gateways(
inp: &[u8],
mut builder: crate::output::describe_customer_gateways_output::Builder,
) -> Result<crate::output::describe_customer_gateways_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeCustomerGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeCustomerGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("customerGatewaySet") /* CustomerGateways com.amazonaws.ec2#DescribeCustomerGatewaysOutput$CustomerGateways */ => {
let var_260 =
Some(
crate::xml_deser::deser_list_customer_gateway_list(&mut tag)
?
)
;
builder = builder.set_customer_gateways(var_260);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_dhcp_options(
inp: &[u8],
mut builder: crate::output::describe_dhcp_options_output::Builder,
) -> Result<crate::output::describe_dhcp_options_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeDhcpOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeDhcpOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpOptionsSet") /* DhcpOptions com.amazonaws.ec2#DescribeDhcpOptionsOutput$DhcpOptions */ => {
let var_261 =
Some(
crate::xml_deser::deser_list_dhcp_options_list(&mut tag)
?
)
;
builder = builder.set_dhcp_options(var_261);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeDhcpOptionsOutput$NextToken */ => {
let var_262 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_262);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_egress_only_internet_gateways(
inp: &[u8],
mut builder: crate::output::describe_egress_only_internet_gateways_output::Builder,
) -> Result<
crate::output::describe_egress_only_internet_gateways_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeEgressOnlyInternetGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeEgressOnlyInternetGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("egressOnlyInternetGatewaySet") /* EgressOnlyInternetGateways com.amazonaws.ec2#DescribeEgressOnlyInternetGatewaysOutput$EgressOnlyInternetGateways */ => {
let var_263 =
Some(
crate::xml_deser::deser_list_egress_only_internet_gateway_list(&mut tag)
?
)
;
builder = builder.set_egress_only_internet_gateways(var_263);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeEgressOnlyInternetGatewaysOutput$NextToken */ => {
let var_264 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_264);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_elastic_gpus(
inp: &[u8],
mut builder: crate::output::describe_elastic_gpus_output::Builder,
) -> Result<crate::output::describe_elastic_gpus_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeElasticGpusResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeElasticGpusResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("elasticGpuSet") /* ElasticGpuSet com.amazonaws.ec2#DescribeElasticGpusOutput$ElasticGpuSet */ => {
let var_265 =
Some(
crate::xml_deser::deser_list_elastic_gpu_set(&mut tag)
?
)
;
builder = builder.set_elastic_gpu_set(var_265);
}
,
s if s.matches("maxResults") /* MaxResults com.amazonaws.ec2#DescribeElasticGpusOutput$MaxResults */ => {
let var_266 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_max_results(var_266);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeElasticGpusOutput$NextToken */ => {
let var_267 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_267);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_export_image_tasks(
inp: &[u8],
mut builder: crate::output::describe_export_image_tasks_output::Builder,
) -> Result<crate::output::describe_export_image_tasks_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeExportImageTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeExportImageTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("exportImageTaskSet") /* ExportImageTasks com.amazonaws.ec2#DescribeExportImageTasksOutput$ExportImageTasks */ => {
let var_268 =
Some(
crate::xml_deser::deser_list_export_image_task_list(&mut tag)
?
)
;
builder = builder.set_export_image_tasks(var_268);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeExportImageTasksOutput$NextToken */ => {
let var_269 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_269);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_export_tasks(
inp: &[u8],
mut builder: crate::output::describe_export_tasks_output::Builder,
) -> Result<crate::output::describe_export_tasks_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeExportTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeExportTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("exportTaskSet") /* ExportTasks com.amazonaws.ec2#DescribeExportTasksOutput$ExportTasks */ => {
let var_270 =
Some(
crate::xml_deser::deser_list_export_task_list(&mut tag)
?
)
;
builder = builder.set_export_tasks(var_270);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fast_snapshot_restores(
inp: &[u8],
mut builder: crate::output::describe_fast_snapshot_restores_output::Builder,
) -> Result<
crate::output::describe_fast_snapshot_restores_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFastSnapshotRestoresResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFastSnapshotRestoresResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fastSnapshotRestoreSet") /* FastSnapshotRestores com.amazonaws.ec2#DescribeFastSnapshotRestoresOutput$FastSnapshotRestores */ => {
let var_271 =
Some(
crate::xml_deser::deser_list_describe_fast_snapshot_restore_success_set(&mut tag)
?
)
;
builder = builder.set_fast_snapshot_restores(var_271);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFastSnapshotRestoresOutput$NextToken */ => {
let var_272 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_272);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fleet_history(
inp: &[u8],
mut builder: crate::output::describe_fleet_history_output::Builder,
) -> Result<crate::output::describe_fleet_history_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFleetHistoryResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFleetHistoryResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("historyRecordSet") /* HistoryRecords com.amazonaws.ec2#DescribeFleetHistoryOutput$HistoryRecords */ => {
let var_273 =
Some(
crate::xml_deser::deser_list_history_record_set(&mut tag)
?
)
;
builder = builder.set_history_records(var_273);
}
,
s if s.matches("lastEvaluatedTime") /* LastEvaluatedTime com.amazonaws.ec2#DescribeFleetHistoryOutput$LastEvaluatedTime */ => {
let var_274 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_last_evaluated_time(var_274);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFleetHistoryOutput$NextToken */ => {
let var_275 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_275);
}
,
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#DescribeFleetHistoryOutput$FleetId */ => {
let var_276 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_276);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#DescribeFleetHistoryOutput$StartTime */ => {
let var_277 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_277);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fleet_instances(
inp: &[u8],
mut builder: crate::output::describe_fleet_instances_output::Builder,
) -> Result<crate::output::describe_fleet_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFleetInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFleetInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("activeInstanceSet") /* ActiveInstances com.amazonaws.ec2#DescribeFleetInstancesOutput$ActiveInstances */ => {
let var_278 =
Some(
crate::xml_deser::deser_list_active_instance_set(&mut tag)
?
)
;
builder = builder.set_active_instances(var_278);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFleetInstancesOutput$NextToken */ => {
let var_279 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_279);
}
,
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#DescribeFleetInstancesOutput$FleetId */ => {
let var_280 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_280);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fleets(
inp: &[u8],
mut builder: crate::output::describe_fleets_output::Builder,
) -> Result<crate::output::describe_fleets_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFleetsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFleetsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFleetsOutput$NextToken */ => {
let var_281 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_281);
}
,
s if s.matches("fleetSet") /* Fleets com.amazonaws.ec2#DescribeFleetsOutput$Fleets */ => {
let var_282 =
Some(
crate::xml_deser::deser_list_fleet_set(&mut tag)
?
)
;
builder = builder.set_fleets(var_282);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_flow_logs(
inp: &[u8],
mut builder: crate::output::describe_flow_logs_output::Builder,
) -> Result<crate::output::describe_flow_logs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFlowLogsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFlowLogsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("flowLogSet") /* FlowLogs com.amazonaws.ec2#DescribeFlowLogsOutput$FlowLogs */ => {
let var_283 =
Some(
crate::xml_deser::deser_list_flow_log_set(&mut tag)
?
)
;
builder = builder.set_flow_logs(var_283);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFlowLogsOutput$NextToken */ => {
let var_284 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_284);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fpga_image_attribute(
inp: &[u8],
mut builder: crate::output::describe_fpga_image_attribute_output::Builder,
) -> Result<
crate::output::describe_fpga_image_attribute_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFpgaImageAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFpgaImageAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageAttribute") /* FpgaImageAttribute com.amazonaws.ec2#DescribeFpgaImageAttributeOutput$FpgaImageAttribute */ => {
let var_285 =
Some(
crate::xml_deser::deser_structure_fpga_image_attribute(&mut tag)
?
)
;
builder = builder.set_fpga_image_attribute(var_285);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_fpga_images(
inp: &[u8],
mut builder: crate::output::describe_fpga_images_output::Builder,
) -> Result<crate::output::describe_fpga_images_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeFpgaImagesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeFpgaImagesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageSet") /* FpgaImages com.amazonaws.ec2#DescribeFpgaImagesOutput$FpgaImages */ => {
let var_286 =
Some(
crate::xml_deser::deser_list_fpga_image_list(&mut tag)
?
)
;
builder = builder.set_fpga_images(var_286);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeFpgaImagesOutput$NextToken */ => {
let var_287 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_287);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_host_reservation_offerings(
inp: &[u8],
mut builder: crate::output::describe_host_reservation_offerings_output::Builder,
) -> Result<
crate::output::describe_host_reservation_offerings_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeHostReservationOfferingsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeHostReservationOfferingsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeHostReservationOfferingsOutput$NextToken */ => {
let var_288 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_288);
}
,
s if s.matches("offeringSet") /* OfferingSet com.amazonaws.ec2#DescribeHostReservationOfferingsOutput$OfferingSet */ => {
let var_289 =
Some(
crate::xml_deser::deser_list_host_offering_set(&mut tag)
?
)
;
builder = builder.set_offering_set(var_289);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_host_reservations(
inp: &[u8],
mut builder: crate::output::describe_host_reservations_output::Builder,
) -> Result<crate::output::describe_host_reservations_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeHostReservationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeHostReservationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("hostReservationSet") /* HostReservationSet com.amazonaws.ec2#DescribeHostReservationsOutput$HostReservationSet */ => {
let var_290 =
Some(
crate::xml_deser::deser_list_host_reservation_set(&mut tag)
?
)
;
builder = builder.set_host_reservation_set(var_290);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeHostReservationsOutput$NextToken */ => {
let var_291 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_291);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_hosts(
inp: &[u8],
mut builder: crate::output::describe_hosts_output::Builder,
) -> Result<crate::output::describe_hosts_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeHostsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeHostsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("hostSet") /* Hosts com.amazonaws.ec2#DescribeHostsOutput$Hosts */ => {
let var_292 =
Some(
crate::xml_deser::deser_list_host_list(&mut tag)
?
)
;
builder = builder.set_hosts(var_292);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeHostsOutput$NextToken */ => {
let var_293 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_293);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_iam_instance_profile_associations(
inp: &[u8],
mut builder: crate::output::describe_iam_instance_profile_associations_output::Builder,
) -> Result<
crate::output::describe_iam_instance_profile_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeIamInstanceProfileAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeIamInstanceProfileAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("iamInstanceProfileAssociationSet") /* IamInstanceProfileAssociations com.amazonaws.ec2#DescribeIamInstanceProfileAssociationsOutput$IamInstanceProfileAssociations */ => {
let var_294 =
Some(
crate::xml_deser::deser_list_iam_instance_profile_association_set(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile_associations(var_294);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeIamInstanceProfileAssociationsOutput$NextToken */ => {
let var_295 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_295);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_identity_id_format(
inp: &[u8],
mut builder: crate::output::describe_identity_id_format_output::Builder,
) -> Result<crate::output::describe_identity_id_format_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeIdentityIdFormatResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeIdentityIdFormatResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("statusSet") /* Statuses com.amazonaws.ec2#DescribeIdentityIdFormatOutput$Statuses */ => {
let var_296 =
Some(
crate::xml_deser::deser_list_id_format_list(&mut tag)
?
)
;
builder = builder.set_statuses(var_296);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_id_format(
inp: &[u8],
mut builder: crate::output::describe_id_format_output::Builder,
) -> Result<crate::output::describe_id_format_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeIdFormatResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeIdFormatResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("statusSet") /* Statuses com.amazonaws.ec2#DescribeIdFormatOutput$Statuses */ => {
let var_297 =
Some(
crate::xml_deser::deser_list_id_format_list(&mut tag)
?
)
;
builder = builder.set_statuses(var_297);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_image_attribute(
inp: &[u8],
mut builder: crate::output::describe_image_attribute_output::Builder,
) -> Result<crate::output::describe_image_attribute_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeImageAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeImageAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#DescribeImageAttributeOutput$BlockDeviceMappings */ => {
let var_298 =
Some(
crate::xml_deser::deser_list_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_298);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#DescribeImageAttributeOutput$ImageId */ => {
let var_299 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_299);
}
,
s if s.matches("launchPermission") /* LaunchPermissions com.amazonaws.ec2#DescribeImageAttributeOutput$LaunchPermissions */ => {
let var_300 =
Some(
crate::xml_deser::deser_list_launch_permission_list(&mut tag)
?
)
;
builder = builder.set_launch_permissions(var_300);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#DescribeImageAttributeOutput$ProductCodes */ => {
let var_301 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_301);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#DescribeImageAttributeOutput$Description */ => {
let var_302 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_description(var_302);
}
,
s if s.matches("kernel") /* KernelId com.amazonaws.ec2#DescribeImageAttributeOutput$KernelId */ => {
let var_303 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_kernel_id(var_303);
}
,
s if s.matches("ramdisk") /* RamdiskId com.amazonaws.ec2#DescribeImageAttributeOutput$RamdiskId */ => {
let var_304 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_ramdisk_id(var_304);
}
,
s if s.matches("sriovNetSupport") /* SriovNetSupport com.amazonaws.ec2#DescribeImageAttributeOutput$SriovNetSupport */ => {
let var_305 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_sriov_net_support(var_305);
}
,
s if s.matches("bootMode") /* BootMode com.amazonaws.ec2#DescribeImageAttributeOutput$BootMode */ => {
let var_306 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_boot_mode(var_306);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_images(
inp: &[u8],
mut builder: crate::output::describe_images_output::Builder,
) -> Result<crate::output::describe_images_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeImagesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeImagesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imagesSet") /* Images com.amazonaws.ec2#DescribeImagesOutput$Images */ => {
let var_307 =
Some(
crate::xml_deser::deser_list_image_list(&mut tag)
?
)
;
builder = builder.set_images(var_307);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_import_image_tasks(
inp: &[u8],
mut builder: crate::output::describe_import_image_tasks_output::Builder,
) -> Result<crate::output::describe_import_image_tasks_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeImportImageTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeImportImageTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("importImageTaskSet") /* ImportImageTasks com.amazonaws.ec2#DescribeImportImageTasksOutput$ImportImageTasks */ => {
let var_308 =
Some(
crate::xml_deser::deser_list_import_image_task_list(&mut tag)
?
)
;
builder = builder.set_import_image_tasks(var_308);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeImportImageTasksOutput$NextToken */ => {
let var_309 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_309);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_import_snapshot_tasks(
inp: &[u8],
mut builder: crate::output::describe_import_snapshot_tasks_output::Builder,
) -> Result<
crate::output::describe_import_snapshot_tasks_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeImportSnapshotTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeImportSnapshotTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("importSnapshotTaskSet") /* ImportSnapshotTasks com.amazonaws.ec2#DescribeImportSnapshotTasksOutput$ImportSnapshotTasks */ => {
let var_310 =
Some(
crate::xml_deser::deser_list_import_snapshot_task_list(&mut tag)
?
)
;
builder = builder.set_import_snapshot_tasks(var_310);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeImportSnapshotTasksOutput$NextToken */ => {
let var_311 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_311);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_attribute(
inp: &[u8],
mut builder: crate::output::describe_instance_attribute_output::Builder,
) -> Result<crate::output::describe_instance_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#DescribeInstanceAttributeOutput$Groups */ => {
let var_312 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_312);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#DescribeInstanceAttributeOutput$BlockDeviceMappings */ => {
let var_313 =
Some(
crate::xml_deser::deser_list_instance_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_313);
}
,
s if s.matches("disableApiTermination") /* DisableApiTermination com.amazonaws.ec2#DescribeInstanceAttributeOutput$DisableApiTermination */ => {
let var_314 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_disable_api_termination(var_314);
}
,
s if s.matches("enaSupport") /* EnaSupport com.amazonaws.ec2#DescribeInstanceAttributeOutput$EnaSupport */ => {
let var_315 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_ena_support(var_315);
}
,
s if s.matches("enclaveOptions") /* EnclaveOptions com.amazonaws.ec2#DescribeInstanceAttributeOutput$EnclaveOptions */ => {
let var_316 =
Some(
crate::xml_deser::deser_structure_enclave_options(&mut tag)
?
)
;
builder = builder.set_enclave_options(var_316);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#DescribeInstanceAttributeOutput$EbsOptimized */ => {
let var_317 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_ebs_optimized(var_317);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#DescribeInstanceAttributeOutput$InstanceId */ => {
let var_318 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_318);
}
,
s if s.matches("instanceInitiatedShutdownBehavior") /* InstanceInitiatedShutdownBehavior com.amazonaws.ec2#DescribeInstanceAttributeOutput$InstanceInitiatedShutdownBehavior */ => {
let var_319 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_instance_initiated_shutdown_behavior(var_319);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#DescribeInstanceAttributeOutput$InstanceType */ => {
let var_320 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_instance_type(var_320);
}
,
s if s.matches("kernel") /* KernelId com.amazonaws.ec2#DescribeInstanceAttributeOutput$KernelId */ => {
let var_321 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_kernel_id(var_321);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#DescribeInstanceAttributeOutput$ProductCodes */ => {
let var_322 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_322);
}
,
s if s.matches("ramdisk") /* RamdiskId com.amazonaws.ec2#DescribeInstanceAttributeOutput$RamdiskId */ => {
let var_323 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_ramdisk_id(var_323);
}
,
s if s.matches("rootDeviceName") /* RootDeviceName com.amazonaws.ec2#DescribeInstanceAttributeOutput$RootDeviceName */ => {
let var_324 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_root_device_name(var_324);
}
,
s if s.matches("sourceDestCheck") /* SourceDestCheck com.amazonaws.ec2#DescribeInstanceAttributeOutput$SourceDestCheck */ => {
let var_325 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_source_dest_check(var_325);
}
,
s if s.matches("sriovNetSupport") /* SriovNetSupport com.amazonaws.ec2#DescribeInstanceAttributeOutput$SriovNetSupport */ => {
let var_326 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_sriov_net_support(var_326);
}
,
s if s.matches("userData") /* UserData com.amazonaws.ec2#DescribeInstanceAttributeOutput$UserData */ => {
let var_327 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_user_data(var_327);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_credit_specifications(
inp: &[u8],
mut builder: crate::output::describe_instance_credit_specifications_output::Builder,
) -> Result<
crate::output::describe_instance_credit_specifications_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceCreditSpecificationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceCreditSpecificationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceCreditSpecificationSet") /* InstanceCreditSpecifications com.amazonaws.ec2#DescribeInstanceCreditSpecificationsOutput$InstanceCreditSpecifications */ => {
let var_328 =
Some(
crate::xml_deser::deser_list_instance_credit_specification_list(&mut tag)
?
)
;
builder = builder.set_instance_credit_specifications(var_328);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstanceCreditSpecificationsOutput$NextToken */ => {
let var_329 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_329);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_event_notification_attributes(
inp: &[u8],
mut builder: crate::output::describe_instance_event_notification_attributes_output::Builder,
) -> Result<
crate::output::describe_instance_event_notification_attributes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceEventNotificationAttributesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceEventNotificationAttributesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTagAttribute") /* InstanceTagAttribute com.amazonaws.ec2#DescribeInstanceEventNotificationAttributesOutput$InstanceTagAttribute */ => {
let var_330 =
Some(
crate::xml_deser::deser_structure_instance_tag_notification_attribute(&mut tag)
?
)
;
builder = builder.set_instance_tag_attribute(var_330);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_event_windows(
inp: &[u8],
mut builder: crate::output::describe_instance_event_windows_output::Builder,
) -> Result<
crate::output::describe_instance_event_windows_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceEventWindowsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceEventWindowsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindowSet") /* InstanceEventWindows com.amazonaws.ec2#DescribeInstanceEventWindowsOutput$InstanceEventWindows */ => {
let var_331 =
Some(
crate::xml_deser::deser_list_instance_event_window_set(&mut tag)
?
)
;
builder = builder.set_instance_event_windows(var_331);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstanceEventWindowsOutput$NextToken */ => {
let var_332 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_332);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instances(
inp: &[u8],
mut builder: crate::output::describe_instances_output::Builder,
) -> Result<crate::output::describe_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservationSet") /* Reservations com.amazonaws.ec2#DescribeInstancesOutput$Reservations */ => {
let var_333 =
Some(
crate::xml_deser::deser_list_reservation_list(&mut tag)
?
)
;
builder = builder.set_reservations(var_333);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstancesOutput$NextToken */ => {
let var_334 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_334);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_status(
inp: &[u8],
mut builder: crate::output::describe_instance_status_output::Builder,
) -> Result<crate::output::describe_instance_status_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceStatusResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceStatusResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceStatusSet") /* InstanceStatuses com.amazonaws.ec2#DescribeInstanceStatusOutput$InstanceStatuses */ => {
let var_335 =
Some(
crate::xml_deser::deser_list_instance_status_list(&mut tag)
?
)
;
builder = builder.set_instance_statuses(var_335);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstanceStatusOutput$NextToken */ => {
let var_336 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_336);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_type_offerings(
inp: &[u8],
mut builder: crate::output::describe_instance_type_offerings_output::Builder,
) -> Result<
crate::output::describe_instance_type_offerings_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceTypeOfferingsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceTypeOfferingsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTypeOfferingSet") /* InstanceTypeOfferings com.amazonaws.ec2#DescribeInstanceTypeOfferingsOutput$InstanceTypeOfferings */ => {
let var_337 =
Some(
crate::xml_deser::deser_list_instance_type_offerings_list(&mut tag)
?
)
;
builder = builder.set_instance_type_offerings(var_337);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstanceTypeOfferingsOutput$NextToken */ => {
let var_338 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_338);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_instance_types(
inp: &[u8],
mut builder: crate::output::describe_instance_types_output::Builder,
) -> Result<crate::output::describe_instance_types_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInstanceTypesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInstanceTypesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTypeSet") /* InstanceTypes com.amazonaws.ec2#DescribeInstanceTypesOutput$InstanceTypes */ => {
let var_339 =
Some(
crate::xml_deser::deser_list_instance_type_info_list(&mut tag)
?
)
;
builder = builder.set_instance_types(var_339);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInstanceTypesOutput$NextToken */ => {
let var_340 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_340);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_internet_gateways(
inp: &[u8],
mut builder: crate::output::describe_internet_gateways_output::Builder,
) -> Result<crate::output::describe_internet_gateways_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeInternetGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeInternetGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("internetGatewaySet") /* InternetGateways com.amazonaws.ec2#DescribeInternetGatewaysOutput$InternetGateways */ => {
let var_341 =
Some(
crate::xml_deser::deser_list_internet_gateway_list(&mut tag)
?
)
;
builder = builder.set_internet_gateways(var_341);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeInternetGatewaysOutput$NextToken */ => {
let var_342 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_342);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_ipv6_pools(
inp: &[u8],
mut builder: crate::output::describe_ipv6_pools_output::Builder,
) -> Result<crate::output::describe_ipv6_pools_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeIpv6PoolsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeIpv6PoolsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6PoolSet") /* Ipv6Pools com.amazonaws.ec2#DescribeIpv6PoolsOutput$Ipv6Pools */ => {
let var_343 =
Some(
crate::xml_deser::deser_list_ipv6_pool_set(&mut tag)
?
)
;
builder = builder.set_ipv6_pools(var_343);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeIpv6PoolsOutput$NextToken */ => {
let var_344 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_344);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_key_pairs(
inp: &[u8],
mut builder: crate::output::describe_key_pairs_output::Builder,
) -> Result<crate::output::describe_key_pairs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeKeyPairsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeKeyPairsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("keySet") /* KeyPairs com.amazonaws.ec2#DescribeKeyPairsOutput$KeyPairs */ => {
let var_345 =
Some(
crate::xml_deser::deser_list_key_pair_list(&mut tag)
?
)
;
builder = builder.set_key_pairs(var_345);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_launch_templates(
inp: &[u8],
mut builder: crate::output::describe_launch_templates_output::Builder,
) -> Result<crate::output::describe_launch_templates_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLaunchTemplatesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLaunchTemplatesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplates") /* LaunchTemplates com.amazonaws.ec2#DescribeLaunchTemplatesOutput$LaunchTemplates */ => {
let var_346 =
Some(
crate::xml_deser::deser_list_launch_template_set(&mut tag)
?
)
;
builder = builder.set_launch_templates(var_346);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLaunchTemplatesOutput$NextToken */ => {
let var_347 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_347);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_launch_template_versions(
inp: &[u8],
mut builder: crate::output::describe_launch_template_versions_output::Builder,
) -> Result<
crate::output::describe_launch_template_versions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLaunchTemplateVersionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLaunchTemplateVersionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateVersionSet") /* LaunchTemplateVersions com.amazonaws.ec2#DescribeLaunchTemplateVersionsOutput$LaunchTemplateVersions */ => {
let var_348 =
Some(
crate::xml_deser::deser_list_launch_template_version_set(&mut tag)
?
)
;
builder = builder.set_launch_template_versions(var_348);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLaunchTemplateVersionsOutput$NextToken */ => {
let var_349 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_349);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_local_gateway_route_tables(
inp: &[u8],
mut builder: crate::output::describe_local_gateway_route_tables_output::Builder,
) -> Result<
crate::output::describe_local_gateway_route_tables_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLocalGatewayRouteTablesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLocalGatewayRouteTablesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableSet") /* LocalGatewayRouteTables com.amazonaws.ec2#DescribeLocalGatewayRouteTablesOutput$LocalGatewayRouteTables */ => {
let var_350 =
Some(
crate::xml_deser::deser_list_local_gateway_route_table_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_route_tables(var_350);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewayRouteTablesOutput$NextToken */ => {
let var_351 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_351);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]pub fn deser_operation_describe_local_gateway_route_table_virtual_interface_group_associations(inp: &[u8], mut builder: crate::output::describe_local_gateway_route_table_virtual_interface_group_associations_output::Builder) -> Result<crate::output::describe_local_gateway_route_table_virtual_interface_group_associations_output::Builder, smithy_xml::decode::XmlError>{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el
.matches("DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse"))
{
return Err(smithy_xml::decode::XmlError::custom(format!("invalid root, expected DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsResponse got {:?}", start_el)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVirtualInterfaceGroupAssociationSet") /* LocalGatewayRouteTableVirtualInterfaceGroupAssociations com.amazonaws.ec2#DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput$LocalGatewayRouteTableVirtualInterfaceGroupAssociations */ => {
let var_352 =
Some(
crate::xml_deser::deser_list_local_gateway_route_table_virtual_interface_group_association_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_route_table_virtual_interface_group_associations(var_352);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewayRouteTableVirtualInterfaceGroupAssociationsOutput$NextToken */ => {
let var_353 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_353);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_local_gateway_route_table_vpc_associations(
inp: &[u8],
mut builder: crate::output::describe_local_gateway_route_table_vpc_associations_output::Builder,
) -> Result<
crate::output::describe_local_gateway_route_table_vpc_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLocalGatewayRouteTableVpcAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLocalGatewayRouteTableVpcAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVpcAssociationSet") /* LocalGatewayRouteTableVpcAssociations com.amazonaws.ec2#DescribeLocalGatewayRouteTableVpcAssociationsOutput$LocalGatewayRouteTableVpcAssociations */ => {
let var_354 =
Some(
crate::xml_deser::deser_list_local_gateway_route_table_vpc_association_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_route_table_vpc_associations(var_354);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewayRouteTableVpcAssociationsOutput$NextToken */ => {
let var_355 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_355);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_local_gateways(
inp: &[u8],
mut builder: crate::output::describe_local_gateways_output::Builder,
) -> Result<crate::output::describe_local_gateways_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLocalGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLocalGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewaySet") /* LocalGateways com.amazonaws.ec2#DescribeLocalGatewaysOutput$LocalGateways */ => {
let var_356 =
Some(
crate::xml_deser::deser_list_local_gateway_set(&mut tag)
?
)
;
builder = builder.set_local_gateways(var_356);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewaysOutput$NextToken */ => {
let var_357 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_357);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_local_gateway_virtual_interface_groups(
inp: &[u8],
mut builder: crate::output::describe_local_gateway_virtual_interface_groups_output::Builder,
) -> Result<
crate::output::describe_local_gateway_virtual_interface_groups_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLocalGatewayVirtualInterfaceGroupsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLocalGatewayVirtualInterfaceGroupsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayVirtualInterfaceGroupSet") /* LocalGatewayVirtualInterfaceGroups com.amazonaws.ec2#DescribeLocalGatewayVirtualInterfaceGroupsOutput$LocalGatewayVirtualInterfaceGroups */ => {
let var_358 =
Some(
crate::xml_deser::deser_list_local_gateway_virtual_interface_group_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_virtual_interface_groups(var_358);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewayVirtualInterfaceGroupsOutput$NextToken */ => {
let var_359 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_359);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_local_gateway_virtual_interfaces(
inp: &[u8],
mut builder: crate::output::describe_local_gateway_virtual_interfaces_output::Builder,
) -> Result<
crate::output::describe_local_gateway_virtual_interfaces_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeLocalGatewayVirtualInterfacesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeLocalGatewayVirtualInterfacesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayVirtualInterfaceSet") /* LocalGatewayVirtualInterfaces com.amazonaws.ec2#DescribeLocalGatewayVirtualInterfacesOutput$LocalGatewayVirtualInterfaces */ => {
let var_360 =
Some(
crate::xml_deser::deser_list_local_gateway_virtual_interface_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_virtual_interfaces(var_360);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeLocalGatewayVirtualInterfacesOutput$NextToken */ => {
let var_361 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_361);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_managed_prefix_lists(
inp: &[u8],
mut builder: crate::output::describe_managed_prefix_lists_output::Builder,
) -> Result<
crate::output::describe_managed_prefix_lists_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeManagedPrefixListsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeManagedPrefixListsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeManagedPrefixListsOutput$NextToken */ => {
let var_362 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_362);
}
,
s if s.matches("prefixListSet") /* PrefixLists com.amazonaws.ec2#DescribeManagedPrefixListsOutput$PrefixLists */ => {
let var_363 =
Some(
crate::xml_deser::deser_list_managed_prefix_list_set(&mut tag)
?
)
;
builder = builder.set_prefix_lists(var_363);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_moving_addresses(
inp: &[u8],
mut builder: crate::output::describe_moving_addresses_output::Builder,
) -> Result<crate::output::describe_moving_addresses_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeMovingAddressesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeMovingAddressesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("movingAddressStatusSet") /* MovingAddressStatuses com.amazonaws.ec2#DescribeMovingAddressesOutput$MovingAddressStatuses */ => {
let var_364 =
Some(
crate::xml_deser::deser_list_moving_address_status_set(&mut tag)
?
)
;
builder = builder.set_moving_address_statuses(var_364);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeMovingAddressesOutput$NextToken */ => {
let var_365 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_365);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_nat_gateways(
inp: &[u8],
mut builder: crate::output::describe_nat_gateways_output::Builder,
) -> Result<crate::output::describe_nat_gateways_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNatGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNatGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("natGatewaySet") /* NatGateways com.amazonaws.ec2#DescribeNatGatewaysOutput$NatGateways */ => {
let var_366 =
Some(
crate::xml_deser::deser_list_nat_gateway_list(&mut tag)
?
)
;
builder = builder.set_nat_gateways(var_366);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNatGatewaysOutput$NextToken */ => {
let var_367 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_367);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_acls(
inp: &[u8],
mut builder: crate::output::describe_network_acls_output::Builder,
) -> Result<crate::output::describe_network_acls_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkAclsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkAclsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkAclSet") /* NetworkAcls com.amazonaws.ec2#DescribeNetworkAclsOutput$NetworkAcls */ => {
let var_368 =
Some(
crate::xml_deser::deser_list_network_acl_list(&mut tag)
?
)
;
builder = builder.set_network_acls(var_368);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNetworkAclsOutput$NextToken */ => {
let var_369 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_369);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_insights_analyses(
inp: &[u8],
mut builder: crate::output::describe_network_insights_analyses_output::Builder,
) -> Result<
crate::output::describe_network_insights_analyses_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkInsightsAnalysesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkInsightsAnalysesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsAnalysisSet") /* NetworkInsightsAnalyses com.amazonaws.ec2#DescribeNetworkInsightsAnalysesOutput$NetworkInsightsAnalyses */ => {
let var_370 =
Some(
crate::xml_deser::deser_list_network_insights_analysis_list(&mut tag)
?
)
;
builder = builder.set_network_insights_analyses(var_370);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNetworkInsightsAnalysesOutput$NextToken */ => {
let var_371 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_371);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_insights_paths(
inp: &[u8],
mut builder: crate::output::describe_network_insights_paths_output::Builder,
) -> Result<
crate::output::describe_network_insights_paths_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkInsightsPathsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkInsightsPathsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsPathSet") /* NetworkInsightsPaths com.amazonaws.ec2#DescribeNetworkInsightsPathsOutput$NetworkInsightsPaths */ => {
let var_372 =
Some(
crate::xml_deser::deser_list_network_insights_path_list(&mut tag)
?
)
;
builder = builder.set_network_insights_paths(var_372);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNetworkInsightsPathsOutput$NextToken */ => {
let var_373 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_373);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_interface_attribute(
inp: &[u8],
mut builder: crate::output::describe_network_interface_attribute_output::Builder,
) -> Result<
crate::output::describe_network_interface_attribute_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkInterfaceAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkInterfaceAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachment") /* Attachment com.amazonaws.ec2#DescribeNetworkInterfaceAttributeOutput$Attachment */ => {
let var_374 =
Some(
crate::xml_deser::deser_structure_network_interface_attachment(&mut tag)
?
)
;
builder = builder.set_attachment(var_374);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#DescribeNetworkInterfaceAttributeOutput$Description */ => {
let var_375 =
Some(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
)
;
builder = builder.set_description(var_375);
}
,
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#DescribeNetworkInterfaceAttributeOutput$Groups */ => {
let var_376 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_376);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#DescribeNetworkInterfaceAttributeOutput$NetworkInterfaceId */ => {
let var_377 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_377);
}
,
s if s.matches("sourceDestCheck") /* SourceDestCheck com.amazonaws.ec2#DescribeNetworkInterfaceAttributeOutput$SourceDestCheck */ => {
let var_378 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_source_dest_check(var_378);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_interface_permissions(
inp: &[u8],
mut builder: crate::output::describe_network_interface_permissions_output::Builder,
) -> Result<
crate::output::describe_network_interface_permissions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkInterfacePermissionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkInterfacePermissionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterfacePermissions") /* NetworkInterfacePermissions com.amazonaws.ec2#DescribeNetworkInterfacePermissionsOutput$NetworkInterfacePermissions */ => {
let var_379 =
Some(
crate::xml_deser::deser_list_network_interface_permission_list(&mut tag)
?
)
;
builder = builder.set_network_interface_permissions(var_379);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNetworkInterfacePermissionsOutput$NextToken */ => {
let var_380 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_380);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_network_interfaces(
inp: &[u8],
mut builder: crate::output::describe_network_interfaces_output::Builder,
) -> Result<crate::output::describe_network_interfaces_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeNetworkInterfacesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeNetworkInterfacesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#DescribeNetworkInterfacesOutput$NetworkInterfaces */ => {
let var_381 =
Some(
crate::xml_deser::deser_list_network_interface_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_381);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeNetworkInterfacesOutput$NextToken */ => {
let var_382 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_382);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_placement_groups(
inp: &[u8],
mut builder: crate::output::describe_placement_groups_output::Builder,
) -> Result<crate::output::describe_placement_groups_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribePlacementGroupsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribePlacementGroupsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("placementGroupSet") /* PlacementGroups com.amazonaws.ec2#DescribePlacementGroupsOutput$PlacementGroups */ => {
let var_383 =
Some(
crate::xml_deser::deser_list_placement_group_list(&mut tag)
?
)
;
builder = builder.set_placement_groups(var_383);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_prefix_lists(
inp: &[u8],
mut builder: crate::output::describe_prefix_lists_output::Builder,
) -> Result<crate::output::describe_prefix_lists_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribePrefixListsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribePrefixListsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribePrefixListsOutput$NextToken */ => {
let var_384 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_384);
}
,
s if s.matches("prefixListSet") /* PrefixLists com.amazonaws.ec2#DescribePrefixListsOutput$PrefixLists */ => {
let var_385 =
Some(
crate::xml_deser::deser_list_prefix_list_set(&mut tag)
?
)
;
builder = builder.set_prefix_lists(var_385);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_principal_id_format(
inp: &[u8],
mut builder: crate::output::describe_principal_id_format_output::Builder,
) -> Result<crate::output::describe_principal_id_format_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribePrincipalIdFormatResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribePrincipalIdFormatResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("principalSet") /* Principals com.amazonaws.ec2#DescribePrincipalIdFormatOutput$Principals */ => {
let var_386 =
Some(
crate::xml_deser::deser_list_principal_id_format_list(&mut tag)
?
)
;
builder = builder.set_principals(var_386);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribePrincipalIdFormatOutput$NextToken */ => {
let var_387 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_387);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_public_ipv4_pools(
inp: &[u8],
mut builder: crate::output::describe_public_ipv4_pools_output::Builder,
) -> Result<crate::output::describe_public_ipv4_pools_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribePublicIpv4PoolsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribePublicIpv4PoolsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("publicIpv4PoolSet") /* PublicIpv4Pools com.amazonaws.ec2#DescribePublicIpv4PoolsOutput$PublicIpv4Pools */ => {
let var_388 =
Some(
crate::xml_deser::deser_list_public_ipv4_pool_set(&mut tag)
?
)
;
builder = builder.set_public_ipv4_pools(var_388);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribePublicIpv4PoolsOutput$NextToken */ => {
let var_389 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_389);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_regions(
inp: &[u8],
mut builder: crate::output::describe_regions_output::Builder,
) -> Result<crate::output::describe_regions_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeRegionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeRegionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("regionInfo") /* Regions com.amazonaws.ec2#DescribeRegionsOutput$Regions */ => {
let var_390 =
Some(
crate::xml_deser::deser_list_region_list(&mut tag)
?
)
;
builder = builder.set_regions(var_390);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_replace_root_volume_tasks(
inp: &[u8],
mut builder: crate::output::describe_replace_root_volume_tasks_output::Builder,
) -> Result<
crate::output::describe_replace_root_volume_tasks_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeReplaceRootVolumeTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeReplaceRootVolumeTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("replaceRootVolumeTaskSet") /* ReplaceRootVolumeTasks com.amazonaws.ec2#DescribeReplaceRootVolumeTasksOutput$ReplaceRootVolumeTasks */ => {
let var_391 =
Some(
crate::xml_deser::deser_list_replace_root_volume_tasks(&mut tag)
?
)
;
builder = builder.set_replace_root_volume_tasks(var_391);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeReplaceRootVolumeTasksOutput$NextToken */ => {
let var_392 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_392);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_reserved_instances(
inp: &[u8],
mut builder: crate::output::describe_reserved_instances_output::Builder,
) -> Result<crate::output::describe_reserved_instances_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeReservedInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeReservedInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesSet") /* ReservedInstances com.amazonaws.ec2#DescribeReservedInstancesOutput$ReservedInstances */ => {
let var_393 =
Some(
crate::xml_deser::deser_list_reserved_instances_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances(var_393);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_reserved_instances_listings(
inp: &[u8],
mut builder: crate::output::describe_reserved_instances_listings_output::Builder,
) -> Result<
crate::output::describe_reserved_instances_listings_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeReservedInstancesListingsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeReservedInstancesListingsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesListingsSet") /* ReservedInstancesListings com.amazonaws.ec2#DescribeReservedInstancesListingsOutput$ReservedInstancesListings */ => {
let var_394 =
Some(
crate::xml_deser::deser_list_reserved_instances_listing_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances_listings(var_394);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_reserved_instances_modifications(
inp: &[u8],
mut builder: crate::output::describe_reserved_instances_modifications_output::Builder,
) -> Result<
crate::output::describe_reserved_instances_modifications_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeReservedInstancesModificationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeReservedInstancesModificationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeReservedInstancesModificationsOutput$NextToken */ => {
let var_395 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_395);
}
,
s if s.matches("reservedInstancesModificationsSet") /* ReservedInstancesModifications com.amazonaws.ec2#DescribeReservedInstancesModificationsOutput$ReservedInstancesModifications */ => {
let var_396 =
Some(
crate::xml_deser::deser_list_reserved_instances_modification_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances_modifications(var_396);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_reserved_instances_offerings(
inp: &[u8],
mut builder: crate::output::describe_reserved_instances_offerings_output::Builder,
) -> Result<
crate::output::describe_reserved_instances_offerings_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeReservedInstancesOfferingsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeReservedInstancesOfferingsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesOfferingsSet") /* ReservedInstancesOfferings com.amazonaws.ec2#DescribeReservedInstancesOfferingsOutput$ReservedInstancesOfferings */ => {
let var_397 =
Some(
crate::xml_deser::deser_list_reserved_instances_offering_list(&mut tag)
?
)
;
builder = builder.set_reserved_instances_offerings(var_397);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeReservedInstancesOfferingsOutput$NextToken */ => {
let var_398 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_398);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_route_tables(
inp: &[u8],
mut builder: crate::output::describe_route_tables_output::Builder,
) -> Result<crate::output::describe_route_tables_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeRouteTablesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeRouteTablesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("routeTableSet") /* RouteTables com.amazonaws.ec2#DescribeRouteTablesOutput$RouteTables */ => {
let var_399 =
Some(
crate::xml_deser::deser_list_route_table_list(&mut tag)
?
)
;
builder = builder.set_route_tables(var_399);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeRouteTablesOutput$NextToken */ => {
let var_400 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_400);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_scheduled_instance_availability(
inp: &[u8],
mut builder: crate::output::describe_scheduled_instance_availability_output::Builder,
) -> Result<
crate::output::describe_scheduled_instance_availability_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeScheduledInstanceAvailabilityResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeScheduledInstanceAvailabilityResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeScheduledInstanceAvailabilityOutput$NextToken */ => {
let var_401 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_401);
}
,
s if s.matches("scheduledInstanceAvailabilitySet") /* ScheduledInstanceAvailabilitySet com.amazonaws.ec2#DescribeScheduledInstanceAvailabilityOutput$ScheduledInstanceAvailabilitySet */ => {
let var_402 =
Some(
crate::xml_deser::deser_list_scheduled_instance_availability_set(&mut tag)
?
)
;
builder = builder.set_scheduled_instance_availability_set(var_402);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_scheduled_instances(
inp: &[u8],
mut builder: crate::output::describe_scheduled_instances_output::Builder,
) -> Result<crate::output::describe_scheduled_instances_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeScheduledInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeScheduledInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeScheduledInstancesOutput$NextToken */ => {
let var_403 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_403);
}
,
s if s.matches("scheduledInstanceSet") /* ScheduledInstanceSet com.amazonaws.ec2#DescribeScheduledInstancesOutput$ScheduledInstanceSet */ => {
let var_404 =
Some(
crate::xml_deser::deser_list_scheduled_instance_set(&mut tag)
?
)
;
builder = builder.set_scheduled_instance_set(var_404);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_security_group_references(
inp: &[u8],
mut builder: crate::output::describe_security_group_references_output::Builder,
) -> Result<
crate::output::describe_security_group_references_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSecurityGroupReferencesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSecurityGroupReferencesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("securityGroupReferenceSet") /* SecurityGroupReferenceSet com.amazonaws.ec2#DescribeSecurityGroupReferencesOutput$SecurityGroupReferenceSet */ => {
let var_405 =
Some(
crate::xml_deser::deser_list_security_group_references(&mut tag)
?
)
;
builder = builder.set_security_group_reference_set(var_405);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_security_group_rules(
inp: &[u8],
mut builder: crate::output::describe_security_group_rules_output::Builder,
) -> Result<
crate::output::describe_security_group_rules_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSecurityGroupRulesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSecurityGroupRulesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("securityGroupRuleSet") /* SecurityGroupRules com.amazonaws.ec2#DescribeSecurityGroupRulesOutput$SecurityGroupRules */ => {
let var_406 =
Some(
crate::xml_deser::deser_list_security_group_rule_list(&mut tag)
?
)
;
builder = builder.set_security_group_rules(var_406);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSecurityGroupRulesOutput$NextToken */ => {
let var_407 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_407);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_security_groups(
inp: &[u8],
mut builder: crate::output::describe_security_groups_output::Builder,
) -> Result<crate::output::describe_security_groups_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSecurityGroupsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSecurityGroupsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("securityGroupInfo") /* SecurityGroups com.amazonaws.ec2#DescribeSecurityGroupsOutput$SecurityGroups */ => {
let var_408 =
Some(
crate::xml_deser::deser_list_security_group_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_408);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSecurityGroupsOutput$NextToken */ => {
let var_409 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_409);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_snapshot_attribute(
inp: &[u8],
mut builder: crate::output::describe_snapshot_attribute_output::Builder,
) -> Result<crate::output::describe_snapshot_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSnapshotAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSnapshotAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("createVolumePermission") /* CreateVolumePermissions com.amazonaws.ec2#DescribeSnapshotAttributeOutput$CreateVolumePermissions */ => {
let var_410 =
Some(
crate::xml_deser::deser_list_create_volume_permission_list(&mut tag)
?
)
;
builder = builder.set_create_volume_permissions(var_410);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#DescribeSnapshotAttributeOutput$ProductCodes */ => {
let var_411 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_411);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#DescribeSnapshotAttributeOutput$SnapshotId */ => {
let var_412 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_412);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_snapshots(
inp: &[u8],
mut builder: crate::output::describe_snapshots_output::Builder,
) -> Result<crate::output::describe_snapshots_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSnapshotsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSnapshotsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotSet") /* Snapshots com.amazonaws.ec2#DescribeSnapshotsOutput$Snapshots */ => {
let var_413 =
Some(
crate::xml_deser::deser_list_snapshot_list(&mut tag)
?
)
;
builder = builder.set_snapshots(var_413);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSnapshotsOutput$NextToken */ => {
let var_414 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_414);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_datafeed_subscription(
inp: &[u8],
mut builder: crate::output::describe_spot_datafeed_subscription_output::Builder,
) -> Result<
crate::output::describe_spot_datafeed_subscription_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotDatafeedSubscriptionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotDatafeedSubscriptionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotDatafeedSubscription") /* SpotDatafeedSubscription com.amazonaws.ec2#DescribeSpotDatafeedSubscriptionOutput$SpotDatafeedSubscription */ => {
let var_415 =
Some(
crate::xml_deser::deser_structure_spot_datafeed_subscription(&mut tag)
?
)
;
builder = builder.set_spot_datafeed_subscription(var_415);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_fleet_instances(
inp: &[u8],
mut builder: crate::output::describe_spot_fleet_instances_output::Builder,
) -> Result<
crate::output::describe_spot_fleet_instances_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotFleetInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotFleetInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("activeInstanceSet") /* ActiveInstances com.amazonaws.ec2#DescribeSpotFleetInstancesOutput$ActiveInstances */ => {
let var_416 =
Some(
crate::xml_deser::deser_list_active_instance_set(&mut tag)
?
)
;
builder = builder.set_active_instances(var_416);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSpotFleetInstancesOutput$NextToken */ => {
let var_417 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_417);
}
,
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#DescribeSpotFleetInstancesOutput$SpotFleetRequestId */ => {
let var_418 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_418);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_fleet_request_history(
inp: &[u8],
mut builder: crate::output::describe_spot_fleet_request_history_output::Builder,
) -> Result<
crate::output::describe_spot_fleet_request_history_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotFleetRequestHistoryResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotFleetRequestHistoryResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("historyRecordSet") /* HistoryRecords com.amazonaws.ec2#DescribeSpotFleetRequestHistoryOutput$HistoryRecords */ => {
let var_419 =
Some(
crate::xml_deser::deser_list_history_records(&mut tag)
?
)
;
builder = builder.set_history_records(var_419);
}
,
s if s.matches("lastEvaluatedTime") /* LastEvaluatedTime com.amazonaws.ec2#DescribeSpotFleetRequestHistoryOutput$LastEvaluatedTime */ => {
let var_420 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_last_evaluated_time(var_420);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSpotFleetRequestHistoryOutput$NextToken */ => {
let var_421 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_421);
}
,
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#DescribeSpotFleetRequestHistoryOutput$SpotFleetRequestId */ => {
let var_422 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_422);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#DescribeSpotFleetRequestHistoryOutput$StartTime */ => {
let var_423 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_423);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_fleet_requests(
inp: &[u8],
mut builder: crate::output::describe_spot_fleet_requests_output::Builder,
) -> Result<crate::output::describe_spot_fleet_requests_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotFleetRequestsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotFleetRequestsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSpotFleetRequestsOutput$NextToken */ => {
let var_424 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_424);
}
,
s if s.matches("spotFleetRequestConfigSet") /* SpotFleetRequestConfigs com.amazonaws.ec2#DescribeSpotFleetRequestsOutput$SpotFleetRequestConfigs */ => {
let var_425 =
Some(
crate::xml_deser::deser_list_spot_fleet_request_config_set(&mut tag)
?
)
;
builder = builder.set_spot_fleet_request_configs(var_425);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_instance_requests(
inp: &[u8],
mut builder: crate::output::describe_spot_instance_requests_output::Builder,
) -> Result<
crate::output::describe_spot_instance_requests_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotInstanceRequestsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotInstanceRequestsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotInstanceRequestSet") /* SpotInstanceRequests com.amazonaws.ec2#DescribeSpotInstanceRequestsOutput$SpotInstanceRequests */ => {
let var_426 =
Some(
crate::xml_deser::deser_list_spot_instance_request_list(&mut tag)
?
)
;
builder = builder.set_spot_instance_requests(var_426);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSpotInstanceRequestsOutput$NextToken */ => {
let var_427 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_427);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_spot_price_history(
inp: &[u8],
mut builder: crate::output::describe_spot_price_history_output::Builder,
) -> Result<crate::output::describe_spot_price_history_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSpotPriceHistoryResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSpotPriceHistoryResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSpotPriceHistoryOutput$NextToken */ => {
let var_428 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_428);
}
,
s if s.matches("spotPriceHistorySet") /* SpotPriceHistory com.amazonaws.ec2#DescribeSpotPriceHistoryOutput$SpotPriceHistory */ => {
let var_429 =
Some(
crate::xml_deser::deser_list_spot_price_history_list(&mut tag)
?
)
;
builder = builder.set_spot_price_history(var_429);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_stale_security_groups(
inp: &[u8],
mut builder: crate::output::describe_stale_security_groups_output::Builder,
) -> Result<
crate::output::describe_stale_security_groups_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeStaleSecurityGroupsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeStaleSecurityGroupsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeStaleSecurityGroupsOutput$NextToken */ => {
let var_430 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_430);
}
,
s if s.matches("staleSecurityGroupSet") /* StaleSecurityGroupSet com.amazonaws.ec2#DescribeStaleSecurityGroupsOutput$StaleSecurityGroupSet */ => {
let var_431 =
Some(
crate::xml_deser::deser_list_stale_security_group_set(&mut tag)
?
)
;
builder = builder.set_stale_security_group_set(var_431);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_store_image_tasks(
inp: &[u8],
mut builder: crate::output::describe_store_image_tasks_output::Builder,
) -> Result<crate::output::describe_store_image_tasks_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeStoreImageTasksResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeStoreImageTasksResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("storeImageTaskResultSet") /* StoreImageTaskResults com.amazonaws.ec2#DescribeStoreImageTasksOutput$StoreImageTaskResults */ => {
let var_432 =
Some(
crate::xml_deser::deser_list_store_image_task_result_set(&mut tag)
?
)
;
builder = builder.set_store_image_task_results(var_432);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeStoreImageTasksOutput$NextToken */ => {
let var_433 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_433);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_subnets(
inp: &[u8],
mut builder: crate::output::describe_subnets_output::Builder,
) -> Result<crate::output::describe_subnets_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeSubnetsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeSubnetsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnetSet") /* Subnets com.amazonaws.ec2#DescribeSubnetsOutput$Subnets */ => {
let var_434 =
Some(
crate::xml_deser::deser_list_subnet_list(&mut tag)
?
)
;
builder = builder.set_subnets(var_434);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeSubnetsOutput$NextToken */ => {
let var_435 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_435);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_tags(
inp: &[u8],
mut builder: crate::output::describe_tags_output::Builder,
) -> Result<crate::output::describe_tags_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTagsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTagsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTagsOutput$NextToken */ => {
let var_436 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_436);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DescribeTagsOutput$Tags */ => {
let var_437 =
Some(
crate::xml_deser::deser_list_tag_description_list(&mut tag)
?
)
;
builder = builder.set_tags(var_437);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_traffic_mirror_filters(
inp: &[u8],
mut builder: crate::output::describe_traffic_mirror_filters_output::Builder,
) -> Result<
crate::output::describe_traffic_mirror_filters_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTrafficMirrorFiltersResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTrafficMirrorFiltersResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterSet") /* TrafficMirrorFilters com.amazonaws.ec2#DescribeTrafficMirrorFiltersOutput$TrafficMirrorFilters */ => {
let var_438 =
Some(
crate::xml_deser::deser_list_traffic_mirror_filter_set(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_filters(var_438);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTrafficMirrorFiltersOutput$NextToken */ => {
let var_439 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_439);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_traffic_mirror_sessions(
inp: &[u8],
mut builder: crate::output::describe_traffic_mirror_sessions_output::Builder,
) -> Result<
crate::output::describe_traffic_mirror_sessions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTrafficMirrorSessionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTrafficMirrorSessionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorSessionSet") /* TrafficMirrorSessions com.amazonaws.ec2#DescribeTrafficMirrorSessionsOutput$TrafficMirrorSessions */ => {
let var_440 =
Some(
crate::xml_deser::deser_list_traffic_mirror_session_set(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_sessions(var_440);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTrafficMirrorSessionsOutput$NextToken */ => {
let var_441 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_441);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_traffic_mirror_targets(
inp: &[u8],
mut builder: crate::output::describe_traffic_mirror_targets_output::Builder,
) -> Result<
crate::output::describe_traffic_mirror_targets_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTrafficMirrorTargetsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTrafficMirrorTargetsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorTargetSet") /* TrafficMirrorTargets com.amazonaws.ec2#DescribeTrafficMirrorTargetsOutput$TrafficMirrorTargets */ => {
let var_442 =
Some(
crate::xml_deser::deser_list_traffic_mirror_target_set(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_targets(var_442);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTrafficMirrorTargetsOutput$NextToken */ => {
let var_443 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_443);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_attachments(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_attachments_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_attachments_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayAttachmentsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayAttachmentsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachments") /* TransitGatewayAttachments com.amazonaws.ec2#DescribeTransitGatewayAttachmentsOutput$TransitGatewayAttachments */ => {
let var_444 =
Some(
crate::xml_deser::deser_list_transit_gateway_attachment_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_attachments(var_444);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayAttachmentsOutput$NextToken */ => {
let var_445 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_445);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_connect_peers(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_connect_peers_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_connect_peers_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayConnectPeersResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayConnectPeersResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnectPeerSet") /* TransitGatewayConnectPeers com.amazonaws.ec2#DescribeTransitGatewayConnectPeersOutput$TransitGatewayConnectPeers */ => {
let var_446 =
Some(
crate::xml_deser::deser_list_transit_gateway_connect_peer_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connect_peers(var_446);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayConnectPeersOutput$NextToken */ => {
let var_447 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_447);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_connects(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_connects_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_connects_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayConnectsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayConnectsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayConnectSet") /* TransitGatewayConnects com.amazonaws.ec2#DescribeTransitGatewayConnectsOutput$TransitGatewayConnects */ => {
let var_448 =
Some(
crate::xml_deser::deser_list_transit_gateway_connect_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_connects(var_448);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayConnectsOutput$NextToken */ => {
let var_449 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_449);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_multicast_domains(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_multicast_domains_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_multicast_domains_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayMulticastDomainsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayMulticastDomainsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomains") /* TransitGatewayMulticastDomains com.amazonaws.ec2#DescribeTransitGatewayMulticastDomainsOutput$TransitGatewayMulticastDomains */ => {
let var_450 =
Some(
crate::xml_deser::deser_list_transit_gateway_multicast_domain_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_multicast_domains(var_450);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayMulticastDomainsOutput$NextToken */ => {
let var_451 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_451);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_peering_attachments(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_peering_attachments_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_peering_attachments_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayPeeringAttachmentsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayPeeringAttachmentsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPeeringAttachments") /* TransitGatewayPeeringAttachments com.amazonaws.ec2#DescribeTransitGatewayPeeringAttachmentsOutput$TransitGatewayPeeringAttachments */ => {
let var_452 =
Some(
crate::xml_deser::deser_list_transit_gateway_peering_attachment_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_peering_attachments(var_452);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayPeeringAttachmentsOutput$NextToken */ => {
let var_453 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_453);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_route_tables(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_route_tables_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_route_tables_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayRouteTablesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayRouteTablesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTables") /* TransitGatewayRouteTables com.amazonaws.ec2#DescribeTransitGatewayRouteTablesOutput$TransitGatewayRouteTables */ => {
let var_454 =
Some(
crate::xml_deser::deser_list_transit_gateway_route_table_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_route_tables(var_454);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayRouteTablesOutput$NextToken */ => {
let var_455 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_455);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateways(
inp: &[u8],
mut builder: crate::output::describe_transit_gateways_output::Builder,
) -> Result<crate::output::describe_transit_gateways_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewaySet") /* TransitGateways com.amazonaws.ec2#DescribeTransitGatewaysOutput$TransitGateways */ => {
let var_456 =
Some(
crate::xml_deser::deser_list_transit_gateway_list(&mut tag)
?
)
;
builder = builder.set_transit_gateways(var_456);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewaysOutput$NextToken */ => {
let var_457 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_457);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_transit_gateway_vpc_attachments(
inp: &[u8],
mut builder: crate::output::describe_transit_gateway_vpc_attachments_output::Builder,
) -> Result<
crate::output::describe_transit_gateway_vpc_attachments_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTransitGatewayVpcAttachmentsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTransitGatewayVpcAttachmentsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachments") /* TransitGatewayVpcAttachments com.amazonaws.ec2#DescribeTransitGatewayVpcAttachmentsOutput$TransitGatewayVpcAttachments */ => {
let var_458 =
Some(
crate::xml_deser::deser_list_transit_gateway_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachments(var_458);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTransitGatewayVpcAttachmentsOutput$NextToken */ => {
let var_459 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_459);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_trunk_interface_associations(
inp: &[u8],
mut builder: crate::output::describe_trunk_interface_associations_output::Builder,
) -> Result<
crate::output::describe_trunk_interface_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeTrunkInterfaceAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeTrunkInterfaceAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("interfaceAssociationSet") /* InterfaceAssociations com.amazonaws.ec2#DescribeTrunkInterfaceAssociationsOutput$InterfaceAssociations */ => {
let var_460 =
Some(
crate::xml_deser::deser_list_trunk_interface_association_list(&mut tag)
?
)
;
builder = builder.set_interface_associations(var_460);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeTrunkInterfaceAssociationsOutput$NextToken */ => {
let var_461 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_461);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_volume_attribute(
inp: &[u8],
mut builder: crate::output::describe_volume_attribute_output::Builder,
) -> Result<crate::output::describe_volume_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVolumeAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVolumeAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("autoEnableIO") /* AutoEnableIO com.amazonaws.ec2#DescribeVolumeAttributeOutput$AutoEnableIO */ => {
let var_462 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_auto_enable_io(var_462);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#DescribeVolumeAttributeOutput$ProductCodes */ => {
let var_463 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_463);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#DescribeVolumeAttributeOutput$VolumeId */ => {
let var_464 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_464);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_volumes(
inp: &[u8],
mut builder: crate::output::describe_volumes_output::Builder,
) -> Result<crate::output::describe_volumes_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVolumesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVolumesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("volumeSet") /* Volumes com.amazonaws.ec2#DescribeVolumesOutput$Volumes */ => {
let var_465 =
Some(
crate::xml_deser::deser_list_volume_list(&mut tag)
?
)
;
builder = builder.set_volumes(var_465);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVolumesOutput$NextToken */ => {
let var_466 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_466);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_volumes_modifications(
inp: &[u8],
mut builder: crate::output::describe_volumes_modifications_output::Builder,
) -> Result<
crate::output::describe_volumes_modifications_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVolumesModificationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVolumesModificationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("volumeModificationSet") /* VolumesModifications com.amazonaws.ec2#DescribeVolumesModificationsOutput$VolumesModifications */ => {
let var_467 =
Some(
crate::xml_deser::deser_list_volume_modification_list(&mut tag)
?
)
;
builder = builder.set_volumes_modifications(var_467);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVolumesModificationsOutput$NextToken */ => {
let var_468 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_468);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_volume_status(
inp: &[u8],
mut builder: crate::output::describe_volume_status_output::Builder,
) -> Result<crate::output::describe_volume_status_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVolumeStatusResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVolumeStatusResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVolumeStatusOutput$NextToken */ => {
let var_469 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_469);
}
,
s if s.matches("volumeStatusSet") /* VolumeStatuses com.amazonaws.ec2#DescribeVolumeStatusOutput$VolumeStatuses */ => {
let var_470 =
Some(
crate::xml_deser::deser_list_volume_status_list(&mut tag)
?
)
;
builder = builder.set_volume_statuses(var_470);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_attribute(
inp: &[u8],
mut builder: crate::output::describe_vpc_attribute_output::Builder,
) -> Result<crate::output::describe_vpc_attribute_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#DescribeVpcAttributeOutput$VpcId */ => {
let var_471 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_471);
}
,
s if s.matches("enableDnsHostnames") /* EnableDnsHostnames com.amazonaws.ec2#DescribeVpcAttributeOutput$EnableDnsHostnames */ => {
let var_472 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_enable_dns_hostnames(var_472);
}
,
s if s.matches("enableDnsSupport") /* EnableDnsSupport com.amazonaws.ec2#DescribeVpcAttributeOutput$EnableDnsSupport */ => {
let var_473 =
Some(
crate::xml_deser::deser_structure_attribute_boolean_value(&mut tag)
?
)
;
builder = builder.set_enable_dns_support(var_473);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_classic_link(
inp: &[u8],
mut builder: crate::output::describe_vpc_classic_link_output::Builder,
) -> Result<crate::output::describe_vpc_classic_link_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcClassicLinkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcClassicLinkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcSet") /* Vpcs com.amazonaws.ec2#DescribeVpcClassicLinkOutput$Vpcs */ => {
let var_474 =
Some(
crate::xml_deser::deser_list_vpc_classic_link_list(&mut tag)
?
)
;
builder = builder.set_vpcs(var_474);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_classic_link_dns_support(
inp: &[u8],
mut builder: crate::output::describe_vpc_classic_link_dns_support_output::Builder,
) -> Result<
crate::output::describe_vpc_classic_link_dns_support_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcClassicLinkDnsSupportResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcClassicLinkDnsSupportResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcClassicLinkDnsSupportOutput$NextToken */ => {
let var_475 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_475);
}
,
s if s.matches("vpcs") /* Vpcs com.amazonaws.ec2#DescribeVpcClassicLinkDnsSupportOutput$Vpcs */ => {
let var_476 =
Some(
crate::xml_deser::deser_list_classic_link_dns_support_list(&mut tag)
?
)
;
builder = builder.set_vpcs(var_476);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoint_connection_notifications(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoint_connection_notifications_output::Builder,
) -> Result<
crate::output::describe_vpc_endpoint_connection_notifications_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointConnectionNotificationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointConnectionNotificationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("connectionNotificationSet") /* ConnectionNotificationSet com.amazonaws.ec2#DescribeVpcEndpointConnectionNotificationsOutput$ConnectionNotificationSet */ => {
let var_477 =
Some(
crate::xml_deser::deser_list_connection_notification_set(&mut tag)
?
)
;
builder = builder.set_connection_notification_set(var_477);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointConnectionNotificationsOutput$NextToken */ => {
let var_478 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_478);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoint_connections(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoint_connections_output::Builder,
) -> Result<
crate::output::describe_vpc_endpoint_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpointConnectionSet") /* VpcEndpointConnections com.amazonaws.ec2#DescribeVpcEndpointConnectionsOutput$VpcEndpointConnections */ => {
let var_479 =
Some(
crate::xml_deser::deser_list_vpc_endpoint_connection_set(&mut tag)
?
)
;
builder = builder.set_vpc_endpoint_connections(var_479);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointConnectionsOutput$NextToken */ => {
let var_480 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_480);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoints(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoints_output::Builder,
) -> Result<crate::output::describe_vpc_endpoints_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpointSet") /* VpcEndpoints com.amazonaws.ec2#DescribeVpcEndpointsOutput$VpcEndpoints */ => {
let var_481 =
Some(
crate::xml_deser::deser_list_vpc_endpoint_set(&mut tag)
?
)
;
builder = builder.set_vpc_endpoints(var_481);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointsOutput$NextToken */ => {
let var_482 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_482);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoint_service_configurations(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoint_service_configurations_output::Builder,
) -> Result<
crate::output::describe_vpc_endpoint_service_configurations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointServiceConfigurationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointServiceConfigurationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceConfigurationSet") /* ServiceConfigurations com.amazonaws.ec2#DescribeVpcEndpointServiceConfigurationsOutput$ServiceConfigurations */ => {
let var_483 =
Some(
crate::xml_deser::deser_list_service_configuration_set(&mut tag)
?
)
;
builder = builder.set_service_configurations(var_483);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointServiceConfigurationsOutput$NextToken */ => {
let var_484 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_484);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoint_service_permissions(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoint_service_permissions_output::Builder,
) -> Result<
crate::output::describe_vpc_endpoint_service_permissions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointServicePermissionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointServicePermissionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allowedPrincipals") /* AllowedPrincipals com.amazonaws.ec2#DescribeVpcEndpointServicePermissionsOutput$AllowedPrincipals */ => {
let var_485 =
Some(
crate::xml_deser::deser_list_allowed_principal_set(&mut tag)
?
)
;
builder = builder.set_allowed_principals(var_485);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointServicePermissionsOutput$NextToken */ => {
let var_486 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_486);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_endpoint_services(
inp: &[u8],
mut builder: crate::output::describe_vpc_endpoint_services_output::Builder,
) -> Result<
crate::output::describe_vpc_endpoint_services_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcEndpointServicesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcEndpointServicesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceNameSet") /* ServiceNames com.amazonaws.ec2#DescribeVpcEndpointServicesOutput$ServiceNames */ => {
let var_487 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_service_names(var_487);
}
,
s if s.matches("serviceDetailSet") /* ServiceDetails com.amazonaws.ec2#DescribeVpcEndpointServicesOutput$ServiceDetails */ => {
let var_488 =
Some(
crate::xml_deser::deser_list_service_detail_set(&mut tag)
?
)
;
builder = builder.set_service_details(var_488);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcEndpointServicesOutput$NextToken */ => {
let var_489 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_489);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpc_peering_connections(
inp: &[u8],
mut builder: crate::output::describe_vpc_peering_connections_output::Builder,
) -> Result<
crate::output::describe_vpc_peering_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcPeeringConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcPeeringConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcPeeringConnectionSet") /* VpcPeeringConnections com.amazonaws.ec2#DescribeVpcPeeringConnectionsOutput$VpcPeeringConnections */ => {
let var_490 =
Some(
crate::xml_deser::deser_list_vpc_peering_connection_list(&mut tag)
?
)
;
builder = builder.set_vpc_peering_connections(var_490);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcPeeringConnectionsOutput$NextToken */ => {
let var_491 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_491);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpcs(
inp: &[u8],
mut builder: crate::output::describe_vpcs_output::Builder,
) -> Result<crate::output::describe_vpcs_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpcsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpcsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcSet") /* Vpcs com.amazonaws.ec2#DescribeVpcsOutput$Vpcs */ => {
let var_492 =
Some(
crate::xml_deser::deser_list_vpc_list(&mut tag)
?
)
;
builder = builder.set_vpcs(var_492);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#DescribeVpcsOutput$NextToken */ => {
let var_493 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_493);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpn_connections(
inp: &[u8],
mut builder: crate::output::describe_vpn_connections_output::Builder,
) -> Result<crate::output::describe_vpn_connections_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpnConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpnConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnectionSet") /* VpnConnections com.amazonaws.ec2#DescribeVpnConnectionsOutput$VpnConnections */ => {
let var_494 =
Some(
crate::xml_deser::deser_list_vpn_connection_list(&mut tag)
?
)
;
builder = builder.set_vpn_connections(var_494);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_describe_vpn_gateways(
inp: &[u8],
mut builder: crate::output::describe_vpn_gateways_output::Builder,
) -> Result<crate::output::describe_vpn_gateways_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DescribeVpnGatewaysResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DescribeVpnGatewaysResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnGatewaySet") /* VpnGateways com.amazonaws.ec2#DescribeVpnGatewaysOutput$VpnGateways */ => {
let var_495 =
Some(
crate::xml_deser::deser_list_vpn_gateway_list(&mut tag)
?
)
;
builder = builder.set_vpn_gateways(var_495);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_detach_classic_link_vpc(
inp: &[u8],
mut builder: crate::output::detach_classic_link_vpc_output::Builder,
) -> Result<crate::output::detach_classic_link_vpc_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DetachClassicLinkVpcResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DetachClassicLinkVpcResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DetachClassicLinkVpcOutput$Return */ => {
let var_496 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_496);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_detach_volume(
inp: &[u8],
mut builder: crate::output::detach_volume_output::Builder,
) -> Result<crate::output::detach_volume_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DetachVolumeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DetachVolumeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#DetachVolumeOutput$AttachTime */ => {
let var_497 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_497);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#DetachVolumeOutput$Device */ => {
let var_498 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device(var_498);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#DetachVolumeOutput$InstanceId */ => {
let var_499 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_499);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#DetachVolumeOutput$State */ => {
let var_500 =
Some(
Result::<crate::model::VolumeAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_500);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#DetachVolumeOutput$VolumeId */ => {
let var_501 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_501);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#DetachVolumeOutput$DeleteOnTermination */ => {
let var_502 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_502);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_ebs_encryption_by_default(
inp: &[u8],
mut builder: crate::output::disable_ebs_encryption_by_default_output::Builder,
) -> Result<
crate::output::disable_ebs_encryption_by_default_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableEbsEncryptionByDefaultResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableEbsEncryptionByDefaultResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ebsEncryptionByDefault") /* EbsEncryptionByDefault com.amazonaws.ec2#DisableEbsEncryptionByDefaultOutput$EbsEncryptionByDefault */ => {
let var_503 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_encryption_by_default(var_503);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_fast_snapshot_restores(
inp: &[u8],
mut builder: crate::output::disable_fast_snapshot_restores_output::Builder,
) -> Result<
crate::output::disable_fast_snapshot_restores_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableFastSnapshotRestoresResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableFastSnapshotRestoresResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successful") /* Successful com.amazonaws.ec2#DisableFastSnapshotRestoresOutput$Successful */ => {
let var_504 =
Some(
crate::xml_deser::deser_list_disable_fast_snapshot_restore_success_set(&mut tag)
?
)
;
builder = builder.set_successful(var_504);
}
,
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#DisableFastSnapshotRestoresOutput$Unsuccessful */ => {
let var_505 =
Some(
crate::xml_deser::deser_list_disable_fast_snapshot_restore_error_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_505);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_image_deprecation(
inp: &[u8],
mut builder: crate::output::disable_image_deprecation_output::Builder,
) -> Result<crate::output::disable_image_deprecation_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableImageDeprecationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableImageDeprecationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DisableImageDeprecationOutput$Return */ => {
let var_506 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_506);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_serial_console_access(
inp: &[u8],
mut builder: crate::output::disable_serial_console_access_output::Builder,
) -> Result<
crate::output::disable_serial_console_access_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableSerialConsoleAccessResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableSerialConsoleAccessResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serialConsoleAccessEnabled") /* SerialConsoleAccessEnabled com.amazonaws.ec2#DisableSerialConsoleAccessOutput$SerialConsoleAccessEnabled */ => {
let var_507 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_serial_console_access_enabled(var_507);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_transit_gateway_route_table_propagation(
inp: &[u8],
mut builder: crate::output::disable_transit_gateway_route_table_propagation_output::Builder,
) -> Result<
crate::output::disable_transit_gateway_route_table_propagation_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableTransitGatewayRouteTablePropagationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableTransitGatewayRouteTablePropagationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("propagation") /* Propagation com.amazonaws.ec2#DisableTransitGatewayRouteTablePropagationOutput$Propagation */ => {
let var_508 =
Some(
crate::xml_deser::deser_structure_transit_gateway_propagation(&mut tag)
?
)
;
builder = builder.set_propagation(var_508);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_vpc_classic_link(
inp: &[u8],
mut builder: crate::output::disable_vpc_classic_link_output::Builder,
) -> Result<crate::output::disable_vpc_classic_link_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableVpcClassicLinkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableVpcClassicLinkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DisableVpcClassicLinkOutput$Return */ => {
let var_509 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_509);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disable_vpc_classic_link_dns_support(
inp: &[u8],
mut builder: crate::output::disable_vpc_classic_link_dns_support_output::Builder,
) -> Result<
crate::output::disable_vpc_classic_link_dns_support_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisableVpcClassicLinkDnsSupportResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisableVpcClassicLinkDnsSupportResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DisableVpcClassicLinkDnsSupportOutput$Return */ => {
let var_510 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_510);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_client_vpn_target_network(
inp: &[u8],
mut builder: crate::output::disassociate_client_vpn_target_network_output::Builder,
) -> Result<
crate::output::disassociate_client_vpn_target_network_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateClientVpnTargetNetworkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateClientVpnTargetNetworkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#DisassociateClientVpnTargetNetworkOutput$AssociationId */ => {
let var_511 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_511);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#DisassociateClientVpnTargetNetworkOutput$Status */ => {
let var_512 =
Some(
crate::xml_deser::deser_structure_association_status(&mut tag)
?
)
;
builder = builder.set_status(var_512);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_enclave_certificate_iam_role(
inp: &[u8],
mut builder: crate::output::disassociate_enclave_certificate_iam_role_output::Builder,
) -> Result<
crate::output::disassociate_enclave_certificate_iam_role_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateEnclaveCertificateIamRoleResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateEnclaveCertificateIamRoleResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DisassociateEnclaveCertificateIamRoleOutput$Return */ => {
let var_513 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_513);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_iam_instance_profile(
inp: &[u8],
mut builder: crate::output::disassociate_iam_instance_profile_output::Builder,
) -> Result<
crate::output::disassociate_iam_instance_profile_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateIamInstanceProfileResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateIamInstanceProfileResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("iamInstanceProfileAssociation") /* IamInstanceProfileAssociation com.amazonaws.ec2#DisassociateIamInstanceProfileOutput$IamInstanceProfileAssociation */ => {
let var_514 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile_association(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile_association(var_514);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_instance_event_window(
inp: &[u8],
mut builder: crate::output::disassociate_instance_event_window_output::Builder,
) -> Result<
crate::output::disassociate_instance_event_window_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateInstanceEventWindowResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateInstanceEventWindowResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindow") /* InstanceEventWindow com.amazonaws.ec2#DisassociateInstanceEventWindowOutput$InstanceEventWindow */ => {
let var_515 =
Some(
crate::xml_deser::deser_structure_instance_event_window(&mut tag)
?
)
;
builder = builder.set_instance_event_window(var_515);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_subnet_cidr_block(
inp: &[u8],
mut builder: crate::output::disassociate_subnet_cidr_block_output::Builder,
) -> Result<
crate::output::disassociate_subnet_cidr_block_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateSubnetCidrBlockResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateSubnetCidrBlockResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrBlockAssociation") /* Ipv6CidrBlockAssociation com.amazonaws.ec2#DisassociateSubnetCidrBlockOutput$Ipv6CidrBlockAssociation */ => {
let var_516 =
Some(
crate::xml_deser::deser_structure_subnet_ipv6_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association(var_516);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#DisassociateSubnetCidrBlockOutput$SubnetId */ => {
let var_517 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_517);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_transit_gateway_multicast_domain(
inp: &[u8],
mut builder: crate::output::disassociate_transit_gateway_multicast_domain_output::Builder,
) -> Result<
crate::output::disassociate_transit_gateway_multicast_domain_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateTransitGatewayMulticastDomainResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateTransitGatewayMulticastDomainResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associations") /* Associations com.amazonaws.ec2#DisassociateTransitGatewayMulticastDomainOutput$Associations */ => {
let var_518 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_associations(&mut tag)
?
)
;
builder = builder.set_associations(var_518);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_transit_gateway_route_table(
inp: &[u8],
mut builder: crate::output::disassociate_transit_gateway_route_table_output::Builder,
) -> Result<
crate::output::disassociate_transit_gateway_route_table_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateTransitGatewayRouteTableResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateTransitGatewayRouteTableResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#DisassociateTransitGatewayRouteTableOutput$Association */ => {
let var_519 =
Some(
crate::xml_deser::deser_structure_transit_gateway_association(&mut tag)
?
)
;
builder = builder.set_association(var_519);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_trunk_interface(
inp: &[u8],
mut builder: crate::output::disassociate_trunk_interface_output::Builder,
) -> Result<crate::output::disassociate_trunk_interface_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateTrunkInterfaceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateTrunkInterfaceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#DisassociateTrunkInterfaceOutput$Return */ => {
let var_520 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_520);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#DisassociateTrunkInterfaceOutput$ClientToken */ => {
let var_521 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_521);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_disassociate_vpc_cidr_block(
inp: &[u8],
mut builder: crate::output::disassociate_vpc_cidr_block_output::Builder,
) -> Result<crate::output::disassociate_vpc_cidr_block_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("DisassociateVpcCidrBlockResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected DisassociateVpcCidrBlockResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrBlockAssociation") /* Ipv6CidrBlockAssociation com.amazonaws.ec2#DisassociateVpcCidrBlockOutput$Ipv6CidrBlockAssociation */ => {
let var_522 =
Some(
crate::xml_deser::deser_structure_vpc_ipv6_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association(var_522);
}
,
s if s.matches("cidrBlockAssociation") /* CidrBlockAssociation com.amazonaws.ec2#DisassociateVpcCidrBlockOutput$CidrBlockAssociation */ => {
let var_523 =
Some(
crate::xml_deser::deser_structure_vpc_cidr_block_association(&mut tag)
?
)
;
builder = builder.set_cidr_block_association(var_523);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#DisassociateVpcCidrBlockOutput$VpcId */ => {
let var_524 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_524);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_ebs_encryption_by_default(
inp: &[u8],
mut builder: crate::output::enable_ebs_encryption_by_default_output::Builder,
) -> Result<
crate::output::enable_ebs_encryption_by_default_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableEbsEncryptionByDefaultResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableEbsEncryptionByDefaultResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ebsEncryptionByDefault") /* EbsEncryptionByDefault com.amazonaws.ec2#EnableEbsEncryptionByDefaultOutput$EbsEncryptionByDefault */ => {
let var_525 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_encryption_by_default(var_525);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_fast_snapshot_restores(
inp: &[u8],
mut builder: crate::output::enable_fast_snapshot_restores_output::Builder,
) -> Result<
crate::output::enable_fast_snapshot_restores_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableFastSnapshotRestoresResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableFastSnapshotRestoresResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successful") /* Successful com.amazonaws.ec2#EnableFastSnapshotRestoresOutput$Successful */ => {
let var_526 =
Some(
crate::xml_deser::deser_list_enable_fast_snapshot_restore_success_set(&mut tag)
?
)
;
builder = builder.set_successful(var_526);
}
,
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#EnableFastSnapshotRestoresOutput$Unsuccessful */ => {
let var_527 =
Some(
crate::xml_deser::deser_list_enable_fast_snapshot_restore_error_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_527);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_image_deprecation(
inp: &[u8],
mut builder: crate::output::enable_image_deprecation_output::Builder,
) -> Result<crate::output::enable_image_deprecation_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableImageDeprecationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableImageDeprecationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#EnableImageDeprecationOutput$Return */ => {
let var_528 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_528);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_serial_console_access(
inp: &[u8],
mut builder: crate::output::enable_serial_console_access_output::Builder,
) -> Result<crate::output::enable_serial_console_access_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableSerialConsoleAccessResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableSerialConsoleAccessResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serialConsoleAccessEnabled") /* SerialConsoleAccessEnabled com.amazonaws.ec2#EnableSerialConsoleAccessOutput$SerialConsoleAccessEnabled */ => {
let var_529 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_serial_console_access_enabled(var_529);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_transit_gateway_route_table_propagation(
inp: &[u8],
mut builder: crate::output::enable_transit_gateway_route_table_propagation_output::Builder,
) -> Result<
crate::output::enable_transit_gateway_route_table_propagation_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableTransitGatewayRouteTablePropagationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableTransitGatewayRouteTablePropagationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("propagation") /* Propagation com.amazonaws.ec2#EnableTransitGatewayRouteTablePropagationOutput$Propagation */ => {
let var_530 =
Some(
crate::xml_deser::deser_structure_transit_gateway_propagation(&mut tag)
?
)
;
builder = builder.set_propagation(var_530);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_vpc_classic_link(
inp: &[u8],
mut builder: crate::output::enable_vpc_classic_link_output::Builder,
) -> Result<crate::output::enable_vpc_classic_link_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableVpcClassicLinkResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableVpcClassicLinkResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#EnableVpcClassicLinkOutput$Return */ => {
let var_531 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_531);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_enable_vpc_classic_link_dns_support(
inp: &[u8],
mut builder: crate::output::enable_vpc_classic_link_dns_support_output::Builder,
) -> Result<
crate::output::enable_vpc_classic_link_dns_support_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("EnableVpcClassicLinkDnsSupportResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected EnableVpcClassicLinkDnsSupportResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#EnableVpcClassicLinkDnsSupportOutput$Return */ => {
let var_532 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_532);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_export_client_vpn_client_certificate_revocation_list(
inp: &[u8],
mut builder: crate::output::export_client_vpn_client_certificate_revocation_list_output::Builder,
) -> Result<
crate::output::export_client_vpn_client_certificate_revocation_list_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ExportClientVpnClientCertificateRevocationListResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!("invalid root, expected ExportClientVpnClientCertificateRevocationListResponse got {:?}", start_el)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("certificateRevocationList") /* CertificateRevocationList com.amazonaws.ec2#ExportClientVpnClientCertificateRevocationListOutput$CertificateRevocationList */ => {
let var_533 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_revocation_list(var_533);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ExportClientVpnClientCertificateRevocationListOutput$Status */ => {
let var_534 =
Some(
crate::xml_deser::deser_structure_client_certificate_revocation_list_status(&mut tag)
?
)
;
builder = builder.set_status(var_534);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_export_client_vpn_client_configuration(
inp: &[u8],
mut builder: crate::output::export_client_vpn_client_configuration_output::Builder,
) -> Result<
crate::output::export_client_vpn_client_configuration_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ExportClientVpnClientConfigurationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ExportClientVpnClientConfigurationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientConfiguration") /* ClientConfiguration com.amazonaws.ec2#ExportClientVpnClientConfigurationOutput$ClientConfiguration */ => {
let var_535 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_configuration(var_535);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_export_image(
inp: &[u8],
mut builder: crate::output::export_image_output::Builder,
) -> Result<crate::output::export_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ExportImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ExportImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ExportImageOutput$Description */ => {
let var_536 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_536);
}
,
s if s.matches("diskImageFormat") /* DiskImageFormat com.amazonaws.ec2#ExportImageOutput$DiskImageFormat */ => {
let var_537 =
Some(
Result::<crate::model::DiskImageFormat, smithy_xml::decode::XmlError>::Ok(
crate::model::DiskImageFormat::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_disk_image_format(var_537);
}
,
s if s.matches("exportImageTaskId") /* ExportImageTaskId com.amazonaws.ec2#ExportImageOutput$ExportImageTaskId */ => {
let var_538 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_export_image_task_id(var_538);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ExportImageOutput$ImageId */ => {
let var_539 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_539);
}
,
s if s.matches("roleName") /* RoleName com.amazonaws.ec2#ExportImageOutput$RoleName */ => {
let var_540 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_role_name(var_540);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#ExportImageOutput$Progress */ => {
let var_541 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_541);
}
,
s if s.matches("s3ExportLocation") /* S3ExportLocation com.amazonaws.ec2#ExportImageOutput$S3ExportLocation */ => {
let var_542 =
Some(
crate::xml_deser::deser_structure_export_task_s3_location(&mut tag)
?
)
;
builder = builder.set_s3_export_location(var_542);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ExportImageOutput$Status */ => {
let var_543 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_543);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ExportImageOutput$StatusMessage */ => {
let var_544 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_544);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ExportImageOutput$Tags */ => {
let var_545 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_545);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_export_transit_gateway_routes(
inp: &[u8],
mut builder: crate::output::export_transit_gateway_routes_output::Builder,
) -> Result<
crate::output::export_transit_gateway_routes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ExportTransitGatewayRoutesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ExportTransitGatewayRoutesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("s3Location") /* S3Location com.amazonaws.ec2#ExportTransitGatewayRoutesOutput$S3Location */ => {
let var_546 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_location(var_546);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_associated_enclave_certificate_iam_roles(
inp: &[u8],
mut builder: crate::output::get_associated_enclave_certificate_iam_roles_output::Builder,
) -> Result<
crate::output::get_associated_enclave_certificate_iam_roles_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetAssociatedEnclaveCertificateIamRolesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetAssociatedEnclaveCertificateIamRolesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associatedRoleSet") /* AssociatedRoles com.amazonaws.ec2#GetAssociatedEnclaveCertificateIamRolesOutput$AssociatedRoles */ => {
let var_547 =
Some(
crate::xml_deser::deser_list_associated_roles_list(&mut tag)
?
)
;
builder = builder.set_associated_roles(var_547);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_associated_ipv6_pool_cidrs(
inp: &[u8],
mut builder: crate::output::get_associated_ipv6_pool_cidrs_output::Builder,
) -> Result<
crate::output::get_associated_ipv6_pool_cidrs_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetAssociatedIpv6PoolCidrsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetAssociatedIpv6PoolCidrsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrAssociationSet") /* Ipv6CidrAssociations com.amazonaws.ec2#GetAssociatedIpv6PoolCidrsOutput$Ipv6CidrAssociations */ => {
let var_548 =
Some(
crate::xml_deser::deser_list_ipv6_cidr_association_set(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_associations(var_548);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetAssociatedIpv6PoolCidrsOutput$NextToken */ => {
let var_549 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_549);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_capacity_reservation_usage(
inp: &[u8],
mut builder: crate::output::get_capacity_reservation_usage_output::Builder,
) -> Result<
crate::output::get_capacity_reservation_usage_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetCapacityReservationUsageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetCapacityReservationUsageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetCapacityReservationUsageOutput$NextToken */ => {
let var_550 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_550);
}
,
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#GetCapacityReservationUsageOutput$CapacityReservationId */ => {
let var_551 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_551);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#GetCapacityReservationUsageOutput$InstanceType */ => {
let var_552 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_552);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#GetCapacityReservationUsageOutput$TotalInstanceCount */ => {
let var_553 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_553);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#GetCapacityReservationUsageOutput$AvailableInstanceCount */ => {
let var_554 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_554);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#GetCapacityReservationUsageOutput$State */ => {
let var_555 =
Some(
Result::<crate::model::CapacityReservationState, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_555);
}
,
s if s.matches("instanceUsageSet") /* InstanceUsages com.amazonaws.ec2#GetCapacityReservationUsageOutput$InstanceUsages */ => {
let var_556 =
Some(
crate::xml_deser::deser_list_instance_usage_set(&mut tag)
?
)
;
builder = builder.set_instance_usages(var_556);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_coip_pool_usage(
inp: &[u8],
mut builder: crate::output::get_coip_pool_usage_output::Builder,
) -> Result<crate::output::get_coip_pool_usage_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetCoipPoolUsageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetCoipPoolUsageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coipPoolId") /* CoipPoolId com.amazonaws.ec2#GetCoipPoolUsageOutput$CoipPoolId */ => {
let var_557 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_coip_pool_id(var_557);
}
,
s if s.matches("coipAddressUsageSet") /* CoipAddressUsages com.amazonaws.ec2#GetCoipPoolUsageOutput$CoipAddressUsages */ => {
let var_558 =
Some(
crate::xml_deser::deser_list_coip_address_usage_set(&mut tag)
?
)
;
builder = builder.set_coip_address_usages(var_558);
}
,
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#GetCoipPoolUsageOutput$LocalGatewayRouteTableId */ => {
let var_559 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_559);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_console_output(
inp: &[u8],
mut builder: crate::output::get_console_output_output::Builder,
) -> Result<crate::output::get_console_output_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetConsoleOutputResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetConsoleOutputResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#GetConsoleOutputOutput$InstanceId */ => {
let var_560 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_560);
}
,
s if s.matches("output") /* Output com.amazonaws.ec2#GetConsoleOutputOutput$Output */ => {
let var_561 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_output(var_561);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#GetConsoleOutputOutput$Timestamp */ => {
let var_562 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_562);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_console_screenshot(
inp: &[u8],
mut builder: crate::output::get_console_screenshot_output::Builder,
) -> Result<crate::output::get_console_screenshot_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetConsoleScreenshotResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetConsoleScreenshotResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageData") /* ImageData com.amazonaws.ec2#GetConsoleScreenshotOutput$ImageData */ => {
let var_563 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_data(var_563);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#GetConsoleScreenshotOutput$InstanceId */ => {
let var_564 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_564);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_default_credit_specification(
inp: &[u8],
mut builder: crate::output::get_default_credit_specification_output::Builder,
) -> Result<
crate::output::get_default_credit_specification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetDefaultCreditSpecificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetDefaultCreditSpecificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceFamilyCreditSpecification") /* InstanceFamilyCreditSpecification com.amazonaws.ec2#GetDefaultCreditSpecificationOutput$InstanceFamilyCreditSpecification */ => {
let var_565 =
Some(
crate::xml_deser::deser_structure_instance_family_credit_specification(&mut tag)
?
)
;
builder = builder.set_instance_family_credit_specification(var_565);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_ebs_default_kms_key_id(
inp: &[u8],
mut builder: crate::output::get_ebs_default_kms_key_id_output::Builder,
) -> Result<crate::output::get_ebs_default_kms_key_id_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetEbsDefaultKmsKeyIdResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetEbsDefaultKmsKeyIdResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#GetEbsDefaultKmsKeyIdOutput$KmsKeyId */ => {
let var_566 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_566);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_ebs_encryption_by_default(
inp: &[u8],
mut builder: crate::output::get_ebs_encryption_by_default_output::Builder,
) -> Result<
crate::output::get_ebs_encryption_by_default_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetEbsEncryptionByDefaultResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetEbsEncryptionByDefaultResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ebsEncryptionByDefault") /* EbsEncryptionByDefault com.amazonaws.ec2#GetEbsEncryptionByDefaultOutput$EbsEncryptionByDefault */ => {
let var_567 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_encryption_by_default(var_567);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_flow_logs_integration_template(
inp: &[u8],
mut builder: crate::output::get_flow_logs_integration_template_output::Builder,
) -> Result<
crate::output::get_flow_logs_integration_template_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetFlowLogsIntegrationTemplateResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetFlowLogsIntegrationTemplateResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("result") /* Result com.amazonaws.ec2#GetFlowLogsIntegrationTemplateOutput$Result */ => {
let var_568 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_result(var_568);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_groups_for_capacity_reservation(
inp: &[u8],
mut builder: crate::output::get_groups_for_capacity_reservation_output::Builder,
) -> Result<
crate::output::get_groups_for_capacity_reservation_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetGroupsForCapacityReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetGroupsForCapacityReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetGroupsForCapacityReservationOutput$NextToken */ => {
let var_569 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_569);
}
,
s if s.matches("capacityReservationGroupSet") /* CapacityReservationGroups com.amazonaws.ec2#GetGroupsForCapacityReservationOutput$CapacityReservationGroups */ => {
let var_570 =
Some(
crate::xml_deser::deser_list_capacity_reservation_group_set(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_groups(var_570);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_host_reservation_purchase_preview(
inp: &[u8],
mut builder: crate::output::get_host_reservation_purchase_preview_output::Builder,
) -> Result<
crate::output::get_host_reservation_purchase_preview_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetHostReservationPurchasePreviewResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetHostReservationPurchasePreviewResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#GetHostReservationPurchasePreviewOutput$CurrencyCode */ => {
let var_571 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_571);
}
,
s if s.matches("purchase") /* Purchase com.amazonaws.ec2#GetHostReservationPurchasePreviewOutput$Purchase */ => {
let var_572 =
Some(
crate::xml_deser::deser_list_purchase_set(&mut tag)
?
)
;
builder = builder.set_purchase(var_572);
}
,
s if s.matches("totalHourlyPrice") /* TotalHourlyPrice com.amazonaws.ec2#GetHostReservationPurchasePreviewOutput$TotalHourlyPrice */ => {
let var_573 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_total_hourly_price(var_573);
}
,
s if s.matches("totalUpfrontPrice") /* TotalUpfrontPrice com.amazonaws.ec2#GetHostReservationPurchasePreviewOutput$TotalUpfrontPrice */ => {
let var_574 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_total_upfront_price(var_574);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_launch_template_data(
inp: &[u8],
mut builder: crate::output::get_launch_template_data_output::Builder,
) -> Result<crate::output::get_launch_template_data_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetLaunchTemplateDataResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetLaunchTemplateDataResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateData") /* LaunchTemplateData com.amazonaws.ec2#GetLaunchTemplateDataOutput$LaunchTemplateData */ => {
let var_575 =
Some(
crate::xml_deser::deser_structure_response_launch_template_data(&mut tag)
?
)
;
builder = builder.set_launch_template_data(var_575);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_managed_prefix_list_associations(
inp: &[u8],
mut builder: crate::output::get_managed_prefix_list_associations_output::Builder,
) -> Result<
crate::output::get_managed_prefix_list_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetManagedPrefixListAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetManagedPrefixListAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixListAssociationSet") /* PrefixListAssociations com.amazonaws.ec2#GetManagedPrefixListAssociationsOutput$PrefixListAssociations */ => {
let var_576 =
Some(
crate::xml_deser::deser_list_prefix_list_association_set(&mut tag)
?
)
;
builder = builder.set_prefix_list_associations(var_576);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetManagedPrefixListAssociationsOutput$NextToken */ => {
let var_577 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_577);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_managed_prefix_list_entries(
inp: &[u8],
mut builder: crate::output::get_managed_prefix_list_entries_output::Builder,
) -> Result<
crate::output::get_managed_prefix_list_entries_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetManagedPrefixListEntriesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetManagedPrefixListEntriesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("entrySet") /* Entries com.amazonaws.ec2#GetManagedPrefixListEntriesOutput$Entries */ => {
let var_578 =
Some(
crate::xml_deser::deser_list_prefix_list_entry_set(&mut tag)
?
)
;
builder = builder.set_entries(var_578);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetManagedPrefixListEntriesOutput$NextToken */ => {
let var_579 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_579);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_password_data(
inp: &[u8],
mut builder: crate::output::get_password_data_output::Builder,
) -> Result<crate::output::get_password_data_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetPasswordDataResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetPasswordDataResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#GetPasswordDataOutput$InstanceId */ => {
let var_580 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_580);
}
,
s if s.matches("passwordData") /* PasswordData com.amazonaws.ec2#GetPasswordDataOutput$PasswordData */ => {
let var_581 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_password_data(var_581);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#GetPasswordDataOutput$Timestamp */ => {
let var_582 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_582);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_reserved_instances_exchange_quote(
inp: &[u8],
mut builder: crate::output::get_reserved_instances_exchange_quote_output::Builder,
) -> Result<
crate::output::get_reserved_instances_exchange_quote_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetReservedInstancesExchangeQuoteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetReservedInstancesExchangeQuoteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$CurrencyCode */ => {
let var_583 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_currency_code(var_583);
}
,
s if s.matches("isValidExchange") /* IsValidExchange com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$IsValidExchange */ => {
let var_584 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_is_valid_exchange(var_584);
}
,
s if s.matches("outputReservedInstancesWillExpireAt") /* OutputReservedInstancesWillExpireAt com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$OutputReservedInstancesWillExpireAt */ => {
let var_585 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_output_reserved_instances_will_expire_at(var_585);
}
,
s if s.matches("paymentDue") /* PaymentDue com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$PaymentDue */ => {
let var_586 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_payment_due(var_586);
}
,
s if s.matches("reservedInstanceValueRollup") /* ReservedInstanceValueRollup com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$ReservedInstanceValueRollup */ => {
let var_587 =
Some(
crate::xml_deser::deser_structure_reservation_value(&mut tag)
?
)
;
builder = builder.set_reserved_instance_value_rollup(var_587);
}
,
s if s.matches("reservedInstanceValueSet") /* ReservedInstanceValueSet com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$ReservedInstanceValueSet */ => {
let var_588 =
Some(
crate::xml_deser::deser_list_reserved_instance_reservation_value_set(&mut tag)
?
)
;
builder = builder.set_reserved_instance_value_set(var_588);
}
,
s if s.matches("targetConfigurationValueRollup") /* TargetConfigurationValueRollup com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$TargetConfigurationValueRollup */ => {
let var_589 =
Some(
crate::xml_deser::deser_structure_reservation_value(&mut tag)
?
)
;
builder = builder.set_target_configuration_value_rollup(var_589);
}
,
s if s.matches("targetConfigurationValueSet") /* TargetConfigurationValueSet com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$TargetConfigurationValueSet */ => {
let var_590 =
Some(
crate::xml_deser::deser_list_target_reservation_value_set(&mut tag)
?
)
;
builder = builder.set_target_configuration_value_set(var_590);
}
,
s if s.matches("validationFailureReason") /* ValidationFailureReason com.amazonaws.ec2#GetReservedInstancesExchangeQuoteOutput$ValidationFailureReason */ => {
let var_591 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_validation_failure_reason(var_591);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_serial_console_access_status(
inp: &[u8],
mut builder: crate::output::get_serial_console_access_status_output::Builder,
) -> Result<
crate::output::get_serial_console_access_status_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetSerialConsoleAccessStatusResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetSerialConsoleAccessStatusResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serialConsoleAccessEnabled") /* SerialConsoleAccessEnabled com.amazonaws.ec2#GetSerialConsoleAccessStatusOutput$SerialConsoleAccessEnabled */ => {
let var_592 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_serial_console_access_enabled(var_592);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_subnet_cidr_reservations(
inp: &[u8],
mut builder: crate::output::get_subnet_cidr_reservations_output::Builder,
) -> Result<crate::output::get_subnet_cidr_reservations_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetSubnetCidrReservationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetSubnetCidrReservationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnetIpv4CidrReservationSet") /* SubnetIpv4CidrReservations com.amazonaws.ec2#GetSubnetCidrReservationsOutput$SubnetIpv4CidrReservations */ => {
let var_593 =
Some(
crate::xml_deser::deser_list_subnet_cidr_reservation_list(&mut tag)
?
)
;
builder = builder.set_subnet_ipv4_cidr_reservations(var_593);
}
,
s if s.matches("subnetIpv6CidrReservationSet") /* SubnetIpv6CidrReservations com.amazonaws.ec2#GetSubnetCidrReservationsOutput$SubnetIpv6CidrReservations */ => {
let var_594 =
Some(
crate::xml_deser::deser_list_subnet_cidr_reservation_list(&mut tag)
?
)
;
builder = builder.set_subnet_ipv6_cidr_reservations(var_594);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetSubnetCidrReservationsOutput$NextToken */ => {
let var_595 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_595);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_transit_gateway_attachment_propagations(
inp: &[u8],
mut builder: crate::output::get_transit_gateway_attachment_propagations_output::Builder,
) -> Result<
crate::output::get_transit_gateway_attachment_propagations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetTransitGatewayAttachmentPropagationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetTransitGatewayAttachmentPropagationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentPropagations") /* TransitGatewayAttachmentPropagations com.amazonaws.ec2#GetTransitGatewayAttachmentPropagationsOutput$TransitGatewayAttachmentPropagations */ => {
let var_596 =
Some(
crate::xml_deser::deser_list_transit_gateway_attachment_propagation_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_attachment_propagations(var_596);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetTransitGatewayAttachmentPropagationsOutput$NextToken */ => {
let var_597 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_597);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_transit_gateway_multicast_domain_associations(
inp: &[u8],
mut builder: crate::output::get_transit_gateway_multicast_domain_associations_output::Builder,
) -> Result<
crate::output::get_transit_gateway_multicast_domain_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetTransitGatewayMulticastDomainAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetTransitGatewayMulticastDomainAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("multicastDomainAssociations") /* MulticastDomainAssociations com.amazonaws.ec2#GetTransitGatewayMulticastDomainAssociationsOutput$MulticastDomainAssociations */ => {
let var_598 =
Some(
crate::xml_deser::deser_list_transit_gateway_multicast_domain_association_list(&mut tag)
?
)
;
builder = builder.set_multicast_domain_associations(var_598);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetTransitGatewayMulticastDomainAssociationsOutput$NextToken */ => {
let var_599 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_599);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_transit_gateway_prefix_list_references(
inp: &[u8],
mut builder: crate::output::get_transit_gateway_prefix_list_references_output::Builder,
) -> Result<
crate::output::get_transit_gateway_prefix_list_references_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetTransitGatewayPrefixListReferencesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetTransitGatewayPrefixListReferencesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPrefixListReferenceSet") /* TransitGatewayPrefixListReferences com.amazonaws.ec2#GetTransitGatewayPrefixListReferencesOutput$TransitGatewayPrefixListReferences */ => {
let var_600 =
Some(
crate::xml_deser::deser_list_transit_gateway_prefix_list_reference_set(&mut tag)
?
)
;
builder = builder.set_transit_gateway_prefix_list_references(var_600);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetTransitGatewayPrefixListReferencesOutput$NextToken */ => {
let var_601 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_601);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_transit_gateway_route_table_associations(
inp: &[u8],
mut builder: crate::output::get_transit_gateway_route_table_associations_output::Builder,
) -> Result<
crate::output::get_transit_gateway_route_table_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetTransitGatewayRouteTableAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetTransitGatewayRouteTableAssociationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associations") /* Associations com.amazonaws.ec2#GetTransitGatewayRouteTableAssociationsOutput$Associations */ => {
let var_602 =
Some(
crate::xml_deser::deser_list_transit_gateway_route_table_association_list(&mut tag)
?
)
;
builder = builder.set_associations(var_602);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetTransitGatewayRouteTableAssociationsOutput$NextToken */ => {
let var_603 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_603);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_get_transit_gateway_route_table_propagations(
inp: &[u8],
mut builder: crate::output::get_transit_gateway_route_table_propagations_output::Builder,
) -> Result<
crate::output::get_transit_gateway_route_table_propagations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("GetTransitGatewayRouteTablePropagationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected GetTransitGatewayRouteTablePropagationsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTablePropagations") /* TransitGatewayRouteTablePropagations com.amazonaws.ec2#GetTransitGatewayRouteTablePropagationsOutput$TransitGatewayRouteTablePropagations */ => {
let var_604 =
Some(
crate::xml_deser::deser_list_transit_gateway_route_table_propagation_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_route_table_propagations(var_604);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#GetTransitGatewayRouteTablePropagationsOutput$NextToken */ => {
let var_605 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_605);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_client_vpn_client_certificate_revocation_list(
inp: &[u8],
mut builder: crate::output::import_client_vpn_client_certificate_revocation_list_output::Builder,
) -> Result<
crate::output::import_client_vpn_client_certificate_revocation_list_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportClientVpnClientCertificateRevocationListResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!("invalid root, expected ImportClientVpnClientCertificateRevocationListResponse got {:?}", start_el)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ImportClientVpnClientCertificateRevocationListOutput$Return */ => {
let var_606 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_606);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_image(
inp: &[u8],
mut builder: crate::output::import_image_output::Builder,
) -> Result<crate::output::import_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ImportImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("architecture") /* Architecture com.amazonaws.ec2#ImportImageOutput$Architecture */ => {
let var_607 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_architecture(var_607);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ImportImageOutput$Description */ => {
let var_608 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_608);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#ImportImageOutput$Encrypted */ => {
let var_609 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_609);
}
,
s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#ImportImageOutput$Hypervisor */ => {
let var_610 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hypervisor(var_610);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ImportImageOutput$ImageId */ => {
let var_611 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_611);
}
,
s if s.matches("importTaskId") /* ImportTaskId com.amazonaws.ec2#ImportImageOutput$ImportTaskId */ => {
let var_612 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_task_id(var_612);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#ImportImageOutput$KmsKeyId */ => {
let var_613 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_613);
}
,
s if s.matches("licenseType") /* LicenseType com.amazonaws.ec2#ImportImageOutput$LicenseType */ => {
let var_614 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_license_type(var_614);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ImportImageOutput$Platform */ => {
let var_615 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_615);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#ImportImageOutput$Progress */ => {
let var_616 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_616);
}
,
s if s.matches("snapshotDetailSet") /* SnapshotDetails com.amazonaws.ec2#ImportImageOutput$SnapshotDetails */ => {
let var_617 =
Some(
crate::xml_deser::deser_list_snapshot_detail_list(&mut tag)
?
)
;
builder = builder.set_snapshot_details(var_617);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ImportImageOutput$Status */ => {
let var_618 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_618);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ImportImageOutput$StatusMessage */ => {
let var_619 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_619);
}
,
s if s.matches("licenseSpecifications") /* LicenseSpecifications com.amazonaws.ec2#ImportImageOutput$LicenseSpecifications */ => {
let var_620 =
Some(
crate::xml_deser::deser_list_import_image_license_specification_list_response(&mut tag)
?
)
;
builder = builder.set_license_specifications(var_620);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ImportImageOutput$Tags */ => {
let var_621 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_621);
}
,
s if s.matches("usageOperation") /* UsageOperation com.amazonaws.ec2#ImportImageOutput$UsageOperation */ => {
let var_622 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_usage_operation(var_622);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_instance(
inp: &[u8],
mut builder: crate::output::import_instance_output::Builder,
) -> Result<crate::output::import_instance_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportInstanceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ImportInstanceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("conversionTask") /* ConversionTask com.amazonaws.ec2#ImportInstanceOutput$ConversionTask */ => {
let var_623 =
Some(
crate::xml_deser::deser_structure_conversion_task(&mut tag)
?
)
;
builder = builder.set_conversion_task(var_623);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_key_pair(
inp: &[u8],
mut builder: crate::output::import_key_pair_output::Builder,
) -> Result<crate::output::import_key_pair_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportKeyPairResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ImportKeyPairResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("keyFingerprint") /* KeyFingerprint com.amazonaws.ec2#ImportKeyPairOutput$KeyFingerprint */ => {
let var_624 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_fingerprint(var_624);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#ImportKeyPairOutput$KeyName */ => {
let var_625 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_625);
}
,
s if s.matches("keyPairId") /* KeyPairId com.amazonaws.ec2#ImportKeyPairOutput$KeyPairId */ => {
let var_626 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_pair_id(var_626);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ImportKeyPairOutput$Tags */ => {
let var_627 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_627);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_snapshot(
inp: &[u8],
mut builder: crate::output::import_snapshot_output::Builder,
) -> Result<crate::output::import_snapshot_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportSnapshotResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ImportSnapshotResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ImportSnapshotOutput$Description */ => {
let var_628 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_628);
}
,
s if s.matches("importTaskId") /* ImportTaskId com.amazonaws.ec2#ImportSnapshotOutput$ImportTaskId */ => {
let var_629 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_task_id(var_629);
}
,
s if s.matches("snapshotTaskDetail") /* SnapshotTaskDetail com.amazonaws.ec2#ImportSnapshotOutput$SnapshotTaskDetail */ => {
let var_630 =
Some(
crate::xml_deser::deser_structure_snapshot_task_detail(&mut tag)
?
)
;
builder = builder.set_snapshot_task_detail(var_630);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ImportSnapshotOutput$Tags */ => {
let var_631 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_631);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_import_volume(
inp: &[u8],
mut builder: crate::output::import_volume_output::Builder,
) -> Result<crate::output::import_volume_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ImportVolumeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ImportVolumeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("conversionTask") /* ConversionTask com.amazonaws.ec2#ImportVolumeOutput$ConversionTask */ => {
let var_632 =
Some(
crate::xml_deser::deser_structure_conversion_task(&mut tag)
?
)
;
builder = builder.set_conversion_task(var_632);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_address_attribute(
inp: &[u8],
mut builder: crate::output::modify_address_attribute_output::Builder,
) -> Result<crate::output::modify_address_attribute_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyAddressAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyAddressAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("address") /* Address com.amazonaws.ec2#ModifyAddressAttributeOutput$Address */ => {
let var_633 =
Some(
crate::xml_deser::deser_structure_address_attribute(&mut tag)
?
)
;
builder = builder.set_address(var_633);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_availability_zone_group(
inp: &[u8],
mut builder: crate::output::modify_availability_zone_group_output::Builder,
) -> Result<
crate::output::modify_availability_zone_group_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyAvailabilityZoneGroupResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyAvailabilityZoneGroupResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyAvailabilityZoneGroupOutput$Return */ => {
let var_634 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_634);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_capacity_reservation(
inp: &[u8],
mut builder: crate::output::modify_capacity_reservation_output::Builder,
) -> Result<crate::output::modify_capacity_reservation_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyCapacityReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyCapacityReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyCapacityReservationOutput$Return */ => {
let var_635 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_635);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_client_vpn_endpoint(
inp: &[u8],
mut builder: crate::output::modify_client_vpn_endpoint_output::Builder,
) -> Result<crate::output::modify_client_vpn_endpoint_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyClientVpnEndpointResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyClientVpnEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyClientVpnEndpointOutput$Return */ => {
let var_636 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_636);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_default_credit_specification(
inp: &[u8],
mut builder: crate::output::modify_default_credit_specification_output::Builder,
) -> Result<
crate::output::modify_default_credit_specification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyDefaultCreditSpecificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyDefaultCreditSpecificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceFamilyCreditSpecification") /* InstanceFamilyCreditSpecification com.amazonaws.ec2#ModifyDefaultCreditSpecificationOutput$InstanceFamilyCreditSpecification */ => {
let var_637 =
Some(
crate::xml_deser::deser_structure_instance_family_credit_specification(&mut tag)
?
)
;
builder = builder.set_instance_family_credit_specification(var_637);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_ebs_default_kms_key_id(
inp: &[u8],
mut builder: crate::output::modify_ebs_default_kms_key_id_output::Builder,
) -> Result<
crate::output::modify_ebs_default_kms_key_id_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyEbsDefaultKmsKeyIdResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyEbsDefaultKmsKeyIdResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#ModifyEbsDefaultKmsKeyIdOutput$KmsKeyId */ => {
let var_638 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_638);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_fleet(
inp: &[u8],
mut builder: crate::output::modify_fleet_output::Builder,
) -> Result<crate::output::modify_fleet_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyFleetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyFleetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyFleetOutput$Return */ => {
let var_639 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_639);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_fpga_image_attribute(
inp: &[u8],
mut builder: crate::output::modify_fpga_image_attribute_output::Builder,
) -> Result<crate::output::modify_fpga_image_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyFpgaImageAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyFpgaImageAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageAttribute") /* FpgaImageAttribute com.amazonaws.ec2#ModifyFpgaImageAttributeOutput$FpgaImageAttribute */ => {
let var_640 =
Some(
crate::xml_deser::deser_structure_fpga_image_attribute(&mut tag)
?
)
;
builder = builder.set_fpga_image_attribute(var_640);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_hosts(
inp: &[u8],
mut builder: crate::output::modify_hosts_output::Builder,
) -> Result<crate::output::modify_hosts_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyHostsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyHostsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successful") /* Successful com.amazonaws.ec2#ModifyHostsOutput$Successful */ => {
let var_641 =
Some(
crate::xml_deser::deser_list_response_host_id_list(&mut tag)
?
)
;
builder = builder.set_successful(var_641);
}
,
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#ModifyHostsOutput$Unsuccessful */ => {
let var_642 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_list(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_642);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_capacity_reservation_attributes(
inp: &[u8],
mut builder: crate::output::modify_instance_capacity_reservation_attributes_output::Builder,
) -> Result<
crate::output::modify_instance_capacity_reservation_attributes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstanceCapacityReservationAttributesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstanceCapacityReservationAttributesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyInstanceCapacityReservationAttributesOutput$Return */ => {
let var_643 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_643);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_credit_specification(
inp: &[u8],
mut builder: crate::output::modify_instance_credit_specification_output::Builder,
) -> Result<
crate::output::modify_instance_credit_specification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstanceCreditSpecificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstanceCreditSpecificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successfulInstanceCreditSpecificationSet") /* SuccessfulInstanceCreditSpecifications com.amazonaws.ec2#ModifyInstanceCreditSpecificationOutput$SuccessfulInstanceCreditSpecifications */ => {
let var_644 =
Some(
crate::xml_deser::deser_list_successful_instance_credit_specification_set(&mut tag)
?
)
;
builder = builder.set_successful_instance_credit_specifications(var_644);
}
,
s if s.matches("unsuccessfulInstanceCreditSpecificationSet") /* UnsuccessfulInstanceCreditSpecifications com.amazonaws.ec2#ModifyInstanceCreditSpecificationOutput$UnsuccessfulInstanceCreditSpecifications */ => {
let var_645 =
Some(
crate::xml_deser::deser_list_unsuccessful_instance_credit_specification_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful_instance_credit_specifications(var_645);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_event_start_time(
inp: &[u8],
mut builder: crate::output::modify_instance_event_start_time_output::Builder,
) -> Result<
crate::output::modify_instance_event_start_time_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstanceEventStartTimeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstanceEventStartTimeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("event") /* Event com.amazonaws.ec2#ModifyInstanceEventStartTimeOutput$Event */ => {
let var_646 =
Some(
crate::xml_deser::deser_structure_instance_status_event(&mut tag)
?
)
;
builder = builder.set_event(var_646);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_event_window(
inp: &[u8],
mut builder: crate::output::modify_instance_event_window_output::Builder,
) -> Result<crate::output::modify_instance_event_window_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstanceEventWindowResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstanceEventWindowResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindow") /* InstanceEventWindow com.amazonaws.ec2#ModifyInstanceEventWindowOutput$InstanceEventWindow */ => {
let var_647 =
Some(
crate::xml_deser::deser_structure_instance_event_window(&mut tag)
?
)
;
builder = builder.set_instance_event_window(var_647);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_metadata_options(
inp: &[u8],
mut builder: crate::output::modify_instance_metadata_options_output::Builder,
) -> Result<
crate::output::modify_instance_metadata_options_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstanceMetadataOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstanceMetadataOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ModifyInstanceMetadataOptionsOutput$InstanceId */ => {
let var_648 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_648);
}
,
s if s.matches("instanceMetadataOptions") /* InstanceMetadataOptions com.amazonaws.ec2#ModifyInstanceMetadataOptionsOutput$InstanceMetadataOptions */ => {
let var_649 =
Some(
crate::xml_deser::deser_structure_instance_metadata_options_response(&mut tag)
?
)
;
builder = builder.set_instance_metadata_options(var_649);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_instance_placement(
inp: &[u8],
mut builder: crate::output::modify_instance_placement_output::Builder,
) -> Result<crate::output::modify_instance_placement_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyInstancePlacementResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyInstancePlacementResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyInstancePlacementOutput$Return */ => {
let var_650 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_650);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_launch_template(
inp: &[u8],
mut builder: crate::output::modify_launch_template_output::Builder,
) -> Result<crate::output::modify_launch_template_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyLaunchTemplateResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyLaunchTemplateResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplate") /* LaunchTemplate com.amazonaws.ec2#ModifyLaunchTemplateOutput$LaunchTemplate */ => {
let var_651 =
Some(
crate::xml_deser::deser_structure_launch_template(&mut tag)
?
)
;
builder = builder.set_launch_template(var_651);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_managed_prefix_list(
inp: &[u8],
mut builder: crate::output::modify_managed_prefix_list_output::Builder,
) -> Result<crate::output::modify_managed_prefix_list_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyManagedPrefixListResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyManagedPrefixListResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixList") /* PrefixList com.amazonaws.ec2#ModifyManagedPrefixListOutput$PrefixList */ => {
let var_652 =
Some(
crate::xml_deser::deser_structure_managed_prefix_list(&mut tag)
?
)
;
builder = builder.set_prefix_list(var_652);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_reserved_instances(
inp: &[u8],
mut builder: crate::output::modify_reserved_instances_output::Builder,
) -> Result<crate::output::modify_reserved_instances_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyReservedInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyReservedInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesModificationId") /* ReservedInstancesModificationId com.amazonaws.ec2#ModifyReservedInstancesOutput$ReservedInstancesModificationId */ => {
let var_653 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_modification_id(var_653);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_security_group_rules(
inp: &[u8],
mut builder: crate::output::modify_security_group_rules_output::Builder,
) -> Result<crate::output::modify_security_group_rules_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifySecurityGroupRulesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifySecurityGroupRulesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifySecurityGroupRulesOutput$Return */ => {
let var_654 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_654);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_spot_fleet_request(
inp: &[u8],
mut builder: crate::output::modify_spot_fleet_request_output::Builder,
) -> Result<crate::output::modify_spot_fleet_request_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifySpotFleetRequestResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifySpotFleetRequestResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifySpotFleetRequestOutput$Return */ => {
let var_655 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_655);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_traffic_mirror_filter_network_services(
inp: &[u8],
mut builder: crate::output::modify_traffic_mirror_filter_network_services_output::Builder,
) -> Result<
crate::output::modify_traffic_mirror_filter_network_services_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTrafficMirrorFilterNetworkServicesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTrafficMirrorFilterNetworkServicesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilter") /* TrafficMirrorFilter com.amazonaws.ec2#ModifyTrafficMirrorFilterNetworkServicesOutput$TrafficMirrorFilter */ => {
let var_656 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_filter(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_filter(var_656);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_traffic_mirror_filter_rule(
inp: &[u8],
mut builder: crate::output::modify_traffic_mirror_filter_rule_output::Builder,
) -> Result<
crate::output::modify_traffic_mirror_filter_rule_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTrafficMirrorFilterRuleResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTrafficMirrorFilterRuleResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterRule") /* TrafficMirrorFilterRule com.amazonaws.ec2#ModifyTrafficMirrorFilterRuleOutput$TrafficMirrorFilterRule */ => {
let var_657 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_filter_rule(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_filter_rule(var_657);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_traffic_mirror_session(
inp: &[u8],
mut builder: crate::output::modify_traffic_mirror_session_output::Builder,
) -> Result<
crate::output::modify_traffic_mirror_session_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTrafficMirrorSessionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTrafficMirrorSessionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorSession") /* TrafficMirrorSession com.amazonaws.ec2#ModifyTrafficMirrorSessionOutput$TrafficMirrorSession */ => {
let var_658 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_session(&mut tag)
?
)
;
builder = builder.set_traffic_mirror_session(var_658);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_transit_gateway(
inp: &[u8],
mut builder: crate::output::modify_transit_gateway_output::Builder,
) -> Result<crate::output::modify_transit_gateway_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTransitGatewayResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTransitGatewayResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGateway") /* TransitGateway com.amazonaws.ec2#ModifyTransitGatewayOutput$TransitGateway */ => {
let var_659 =
Some(
crate::xml_deser::deser_structure_transit_gateway(&mut tag)
?
)
;
builder = builder.set_transit_gateway(var_659);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_transit_gateway_prefix_list_reference(
inp: &[u8],
mut builder: crate::output::modify_transit_gateway_prefix_list_reference_output::Builder,
) -> Result<
crate::output::modify_transit_gateway_prefix_list_reference_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTransitGatewayPrefixListReferenceResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTransitGatewayPrefixListReferenceResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPrefixListReference") /* TransitGatewayPrefixListReference com.amazonaws.ec2#ModifyTransitGatewayPrefixListReferenceOutput$TransitGatewayPrefixListReference */ => {
let var_660 =
Some(
crate::xml_deser::deser_structure_transit_gateway_prefix_list_reference(&mut tag)
?
)
;
builder = builder.set_transit_gateway_prefix_list_reference(var_660);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_transit_gateway_vpc_attachment(
inp: &[u8],
mut builder: crate::output::modify_transit_gateway_vpc_attachment_output::Builder,
) -> Result<
crate::output::modify_transit_gateway_vpc_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyTransitGatewayVpcAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyTransitGatewayVpcAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachment") /* TransitGatewayVpcAttachment com.amazonaws.ec2#ModifyTransitGatewayVpcAttachmentOutput$TransitGatewayVpcAttachment */ => {
let var_661 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachment(var_661);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_volume(
inp: &[u8],
mut builder: crate::output::modify_volume_output::Builder,
) -> Result<crate::output::modify_volume_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVolumeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVolumeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("volumeModification") /* VolumeModification com.amazonaws.ec2#ModifyVolumeOutput$VolumeModification */ => {
let var_662 =
Some(
crate::xml_deser::deser_structure_volume_modification(&mut tag)
?
)
;
builder = builder.set_volume_modification(var_662);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_endpoint(
inp: &[u8],
mut builder: crate::output::modify_vpc_endpoint_output::Builder,
) -> Result<crate::output::modify_vpc_endpoint_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcEndpointResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcEndpointResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyVpcEndpointOutput$Return */ => {
let var_663 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_663);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_endpoint_connection_notification(
inp: &[u8],
mut builder: crate::output::modify_vpc_endpoint_connection_notification_output::Builder,
) -> Result<
crate::output::modify_vpc_endpoint_connection_notification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcEndpointConnectionNotificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcEndpointConnectionNotificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* ReturnValue com.amazonaws.ec2#ModifyVpcEndpointConnectionNotificationOutput$ReturnValue */ => {
let var_664 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return_value(var_664);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_endpoint_service_configuration(
inp: &[u8],
mut builder: crate::output::modify_vpc_endpoint_service_configuration_output::Builder,
) -> Result<
crate::output::modify_vpc_endpoint_service_configuration_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcEndpointServiceConfigurationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcEndpointServiceConfigurationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ModifyVpcEndpointServiceConfigurationOutput$Return */ => {
let var_665 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_665);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_endpoint_service_permissions(
inp: &[u8],
mut builder: crate::output::modify_vpc_endpoint_service_permissions_output::Builder,
) -> Result<
crate::output::modify_vpc_endpoint_service_permissions_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcEndpointServicePermissionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcEndpointServicePermissionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* ReturnValue com.amazonaws.ec2#ModifyVpcEndpointServicePermissionsOutput$ReturnValue */ => {
let var_666 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return_value(var_666);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_peering_connection_options(
inp: &[u8],
mut builder: crate::output::modify_vpc_peering_connection_options_output::Builder,
) -> Result<
crate::output::modify_vpc_peering_connection_options_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcPeeringConnectionOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcPeeringConnectionOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accepterPeeringConnectionOptions") /* AccepterPeeringConnectionOptions com.amazonaws.ec2#ModifyVpcPeeringConnectionOptionsOutput$AccepterPeeringConnectionOptions */ => {
let var_667 =
Some(
crate::xml_deser::deser_structure_peering_connection_options(&mut tag)
?
)
;
builder = builder.set_accepter_peering_connection_options(var_667);
}
,
s if s.matches("requesterPeeringConnectionOptions") /* RequesterPeeringConnectionOptions com.amazonaws.ec2#ModifyVpcPeeringConnectionOptionsOutput$RequesterPeeringConnectionOptions */ => {
let var_668 =
Some(
crate::xml_deser::deser_structure_peering_connection_options(&mut tag)
?
)
;
builder = builder.set_requester_peering_connection_options(var_668);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpc_tenancy(
inp: &[u8],
mut builder: crate::output::modify_vpc_tenancy_output::Builder,
) -> Result<crate::output::modify_vpc_tenancy_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpcTenancyResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpcTenancyResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* ReturnValue com.amazonaws.ec2#ModifyVpcTenancyOutput$ReturnValue */ => {
let var_669 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return_value(var_669);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpn_connection(
inp: &[u8],
mut builder: crate::output::modify_vpn_connection_output::Builder,
) -> Result<crate::output::modify_vpn_connection_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpnConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpnConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#ModifyVpnConnectionOutput$VpnConnection */ => {
let var_670 =
Some(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_670);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpn_connection_options(
inp: &[u8],
mut builder: crate::output::modify_vpn_connection_options_output::Builder,
) -> Result<
crate::output::modify_vpn_connection_options_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpnConnectionOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpnConnectionOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#ModifyVpnConnectionOptionsOutput$VpnConnection */ => {
let var_671 =
Some(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_671);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpn_tunnel_certificate(
inp: &[u8],
mut builder: crate::output::modify_vpn_tunnel_certificate_output::Builder,
) -> Result<
crate::output::modify_vpn_tunnel_certificate_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpnTunnelCertificateResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpnTunnelCertificateResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#ModifyVpnTunnelCertificateOutput$VpnConnection */ => {
let var_672 =
Some(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_672);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_modify_vpn_tunnel_options(
inp: &[u8],
mut builder: crate::output::modify_vpn_tunnel_options_output::Builder,
) -> Result<crate::output::modify_vpn_tunnel_options_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ModifyVpnTunnelOptionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ModifyVpnTunnelOptionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#ModifyVpnTunnelOptionsOutput$VpnConnection */ => {
let var_673 =
Some(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_673);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_monitor_instances(
inp: &[u8],
mut builder: crate::output::monitor_instances_output::Builder,
) -> Result<crate::output::monitor_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("MonitorInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected MonitorInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* InstanceMonitorings com.amazonaws.ec2#MonitorInstancesOutput$InstanceMonitorings */ => {
let var_674 =
Some(
crate::xml_deser::deser_list_instance_monitoring_list(&mut tag)
?
)
;
builder = builder.set_instance_monitorings(var_674);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_move_address_to_vpc(
inp: &[u8],
mut builder: crate::output::move_address_to_vpc_output::Builder,
) -> Result<crate::output::move_address_to_vpc_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("MoveAddressToVpcResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected MoveAddressToVpcResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#MoveAddressToVpcOutput$AllocationId */ => {
let var_675 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_675);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#MoveAddressToVpcOutput$Status */ => {
let var_676 =
Some(
Result::<crate::model::Status, smithy_xml::decode::XmlError>::Ok(
crate::model::Status::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_676);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_provision_byoip_cidr(
inp: &[u8],
mut builder: crate::output::provision_byoip_cidr_output::Builder,
) -> Result<crate::output::provision_byoip_cidr_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ProvisionByoipCidrResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ProvisionByoipCidrResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("byoipCidr") /* ByoipCidr com.amazonaws.ec2#ProvisionByoipCidrOutput$ByoipCidr */ => {
let var_677 =
Some(
crate::xml_deser::deser_structure_byoip_cidr(&mut tag)
?
)
;
builder = builder.set_byoip_cidr(var_677);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_purchase_host_reservation(
inp: &[u8],
mut builder: crate::output::purchase_host_reservation_output::Builder,
) -> Result<crate::output::purchase_host_reservation_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("PurchaseHostReservationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected PurchaseHostReservationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#PurchaseHostReservationOutput$ClientToken */ => {
let var_678 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_678);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#PurchaseHostReservationOutput$CurrencyCode */ => {
let var_679 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_679);
}
,
s if s.matches("purchase") /* Purchase com.amazonaws.ec2#PurchaseHostReservationOutput$Purchase */ => {
let var_680 =
Some(
crate::xml_deser::deser_list_purchase_set(&mut tag)
?
)
;
builder = builder.set_purchase(var_680);
}
,
s if s.matches("totalHourlyPrice") /* TotalHourlyPrice com.amazonaws.ec2#PurchaseHostReservationOutput$TotalHourlyPrice */ => {
let var_681 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_total_hourly_price(var_681);
}
,
s if s.matches("totalUpfrontPrice") /* TotalUpfrontPrice com.amazonaws.ec2#PurchaseHostReservationOutput$TotalUpfrontPrice */ => {
let var_682 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_total_upfront_price(var_682);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_purchase_reserved_instances_offering(
inp: &[u8],
mut builder: crate::output::purchase_reserved_instances_offering_output::Builder,
) -> Result<
crate::output::purchase_reserved_instances_offering_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("PurchaseReservedInstancesOfferingResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected PurchaseReservedInstancesOfferingResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#PurchaseReservedInstancesOfferingOutput$ReservedInstancesId */ => {
let var_683 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_683);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_purchase_scheduled_instances(
inp: &[u8],
mut builder: crate::output::purchase_scheduled_instances_output::Builder,
) -> Result<crate::output::purchase_scheduled_instances_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("PurchaseScheduledInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected PurchaseScheduledInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("scheduledInstanceSet") /* ScheduledInstanceSet com.amazonaws.ec2#PurchaseScheduledInstancesOutput$ScheduledInstanceSet */ => {
let var_684 =
Some(
crate::xml_deser::deser_list_purchased_scheduled_instance_set(&mut tag)
?
)
;
builder = builder.set_scheduled_instance_set(var_684);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_register_image(
inp: &[u8],
mut builder: crate::output::register_image_output::Builder,
) -> Result<crate::output::register_image_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RegisterImageResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RegisterImageResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#RegisterImageOutput$ImageId */ => {
let var_685 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_685);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_register_instance_event_notification_attributes(
inp: &[u8],
mut builder: crate::output::register_instance_event_notification_attributes_output::Builder,
) -> Result<
crate::output::register_instance_event_notification_attributes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RegisterInstanceEventNotificationAttributesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RegisterInstanceEventNotificationAttributesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTagAttribute") /* InstanceTagAttribute com.amazonaws.ec2#RegisterInstanceEventNotificationAttributesOutput$InstanceTagAttribute */ => {
let var_686 =
Some(
crate::xml_deser::deser_structure_instance_tag_notification_attribute(&mut tag)
?
)
;
builder = builder.set_instance_tag_attribute(var_686);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_register_transit_gateway_multicast_group_members(
inp: &[u8],
mut builder: crate::output::register_transit_gateway_multicast_group_members_output::Builder,
) -> Result<
crate::output::register_transit_gateway_multicast_group_members_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RegisterTransitGatewayMulticastGroupMembersResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RegisterTransitGatewayMulticastGroupMembersResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("registeredMulticastGroupMembers") /* RegisteredMulticastGroupMembers com.amazonaws.ec2#RegisterTransitGatewayMulticastGroupMembersOutput$RegisteredMulticastGroupMembers */ => {
let var_687 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_registered_group_members(&mut tag)
?
)
;
builder = builder.set_registered_multicast_group_members(var_687);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_register_transit_gateway_multicast_group_sources(
inp: &[u8],
mut builder: crate::output::register_transit_gateway_multicast_group_sources_output::Builder,
) -> Result<
crate::output::register_transit_gateway_multicast_group_sources_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RegisterTransitGatewayMulticastGroupSourcesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RegisterTransitGatewayMulticastGroupSourcesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("registeredMulticastGroupSources") /* RegisteredMulticastGroupSources com.amazonaws.ec2#RegisterTransitGatewayMulticastGroupSourcesOutput$RegisteredMulticastGroupSources */ => {
let var_688 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_registered_group_sources(&mut tag)
?
)
;
builder = builder.set_registered_multicast_group_sources(var_688);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reject_transit_gateway_multicast_domain_associations(
inp: &[u8],
mut builder: crate::output::reject_transit_gateway_multicast_domain_associations_output::Builder,
) -> Result<
crate::output::reject_transit_gateway_multicast_domain_associations_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RejectTransitGatewayMulticastDomainAssociationsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!("invalid root, expected RejectTransitGatewayMulticastDomainAssociationsResponse got {:?}", start_el)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associations") /* Associations com.amazonaws.ec2#RejectTransitGatewayMulticastDomainAssociationsOutput$Associations */ => {
let var_689 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_associations(&mut tag)
?
)
;
builder = builder.set_associations(var_689);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reject_transit_gateway_peering_attachment(
inp: &[u8],
mut builder: crate::output::reject_transit_gateway_peering_attachment_output::Builder,
) -> Result<
crate::output::reject_transit_gateway_peering_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RejectTransitGatewayPeeringAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RejectTransitGatewayPeeringAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayPeeringAttachment") /* TransitGatewayPeeringAttachment com.amazonaws.ec2#RejectTransitGatewayPeeringAttachmentOutput$TransitGatewayPeeringAttachment */ => {
let var_690 =
Some(
crate::xml_deser::deser_structure_transit_gateway_peering_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_peering_attachment(var_690);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reject_transit_gateway_vpc_attachment(
inp: &[u8],
mut builder: crate::output::reject_transit_gateway_vpc_attachment_output::Builder,
) -> Result<
crate::output::reject_transit_gateway_vpc_attachment_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RejectTransitGatewayVpcAttachmentResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RejectTransitGatewayVpcAttachmentResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayVpcAttachment") /* TransitGatewayVpcAttachment com.amazonaws.ec2#RejectTransitGatewayVpcAttachmentOutput$TransitGatewayVpcAttachment */ => {
let var_691 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_vpc_attachment(var_691);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reject_vpc_endpoint_connections(
inp: &[u8],
mut builder: crate::output::reject_vpc_endpoint_connections_output::Builder,
) -> Result<
crate::output::reject_vpc_endpoint_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RejectVpcEndpointConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RejectVpcEndpointConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#RejectVpcEndpointConnectionsOutput$Unsuccessful */ => {
let var_692 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_set(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_692);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reject_vpc_peering_connection(
inp: &[u8],
mut builder: crate::output::reject_vpc_peering_connection_output::Builder,
) -> Result<
crate::output::reject_vpc_peering_connection_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RejectVpcPeeringConnectionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RejectVpcPeeringConnectionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#RejectVpcPeeringConnectionOutput$Return */ => {
let var_693 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_693);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_release_hosts(
inp: &[u8],
mut builder: crate::output::release_hosts_output::Builder,
) -> Result<crate::output::release_hosts_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReleaseHostsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ReleaseHostsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("successful") /* Successful com.amazonaws.ec2#ReleaseHostsOutput$Successful */ => {
let var_694 =
Some(
crate::xml_deser::deser_list_response_host_id_list(&mut tag)
?
)
;
builder = builder.set_successful(var_694);
}
,
s if s.matches("unsuccessful") /* Unsuccessful com.amazonaws.ec2#ReleaseHostsOutput$Unsuccessful */ => {
let var_695 =
Some(
crate::xml_deser::deser_list_unsuccessful_item_list(&mut tag)
?
)
;
builder = builder.set_unsuccessful(var_695);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_replace_iam_instance_profile_association(
inp: &[u8],
mut builder: crate::output::replace_iam_instance_profile_association_output::Builder,
) -> Result<
crate::output::replace_iam_instance_profile_association_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReplaceIamInstanceProfileAssociationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ReplaceIamInstanceProfileAssociationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("iamInstanceProfileAssociation") /* IamInstanceProfileAssociation com.amazonaws.ec2#ReplaceIamInstanceProfileAssociationOutput$IamInstanceProfileAssociation */ => {
let var_696 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile_association(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile_association(var_696);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_replace_network_acl_association(
inp: &[u8],
mut builder: crate::output::replace_network_acl_association_output::Builder,
) -> Result<
crate::output::replace_network_acl_association_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReplaceNetworkAclAssociationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ReplaceNetworkAclAssociationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("newAssociationId") /* NewAssociationId com.amazonaws.ec2#ReplaceNetworkAclAssociationOutput$NewAssociationId */ => {
let var_697 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_new_association_id(var_697);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_replace_route_table_association(
inp: &[u8],
mut builder: crate::output::replace_route_table_association_output::Builder,
) -> Result<
crate::output::replace_route_table_association_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReplaceRouteTableAssociationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ReplaceRouteTableAssociationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("newAssociationId") /* NewAssociationId com.amazonaws.ec2#ReplaceRouteTableAssociationOutput$NewAssociationId */ => {
let var_698 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_new_association_id(var_698);
}
,
s if s.matches("associationState") /* AssociationState com.amazonaws.ec2#ReplaceRouteTableAssociationOutput$AssociationState */ => {
let var_699 =
Some(
crate::xml_deser::deser_structure_route_table_association_state(&mut tag)
?
)
;
builder = builder.set_association_state(var_699);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_replace_transit_gateway_route(
inp: &[u8],
mut builder: crate::output::replace_transit_gateway_route_output::Builder,
) -> Result<
crate::output::replace_transit_gateway_route_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ReplaceTransitGatewayRouteResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ReplaceTransitGatewayRouteResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("route") /* Route com.amazonaws.ec2#ReplaceTransitGatewayRouteOutput$Route */ => {
let var_700 =
Some(
crate::xml_deser::deser_structure_transit_gateway_route(&mut tag)
?
)
;
builder = builder.set_route(var_700);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_request_spot_fleet(
inp: &[u8],
mut builder: crate::output::request_spot_fleet_output::Builder,
) -> Result<crate::output::request_spot_fleet_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RequestSpotFleetResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RequestSpotFleetResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#RequestSpotFleetOutput$SpotFleetRequestId */ => {
let var_701 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_701);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_request_spot_instances(
inp: &[u8],
mut builder: crate::output::request_spot_instances_output::Builder,
) -> Result<crate::output::request_spot_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RequestSpotInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RequestSpotInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotInstanceRequestSet") /* SpotInstanceRequests com.amazonaws.ec2#RequestSpotInstancesOutput$SpotInstanceRequests */ => {
let var_702 =
Some(
crate::xml_deser::deser_list_spot_instance_request_list(&mut tag)
?
)
;
builder = builder.set_spot_instance_requests(var_702);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reset_address_attribute(
inp: &[u8],
mut builder: crate::output::reset_address_attribute_output::Builder,
) -> Result<crate::output::reset_address_attribute_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ResetAddressAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ResetAddressAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("address") /* Address com.amazonaws.ec2#ResetAddressAttributeOutput$Address */ => {
let var_703 =
Some(
crate::xml_deser::deser_structure_address_attribute(&mut tag)
?
)
;
builder = builder.set_address(var_703);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reset_ebs_default_kms_key_id(
inp: &[u8],
mut builder: crate::output::reset_ebs_default_kms_key_id_output::Builder,
) -> Result<crate::output::reset_ebs_default_kms_key_id_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ResetEbsDefaultKmsKeyIdResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ResetEbsDefaultKmsKeyIdResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#ResetEbsDefaultKmsKeyIdOutput$KmsKeyId */ => {
let var_704 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_704);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_reset_fpga_image_attribute(
inp: &[u8],
mut builder: crate::output::reset_fpga_image_attribute_output::Builder,
) -> Result<crate::output::reset_fpga_image_attribute_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("ResetFpgaImageAttributeResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected ResetFpgaImageAttributeResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#ResetFpgaImageAttributeOutput$Return */ => {
let var_705 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_705);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_restore_address_to_classic(
inp: &[u8],
mut builder: crate::output::restore_address_to_classic_output::Builder,
) -> Result<crate::output::restore_address_to_classic_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RestoreAddressToClassicResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RestoreAddressToClassicResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#RestoreAddressToClassicOutput$PublicIp */ => {
let var_706 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_706);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#RestoreAddressToClassicOutput$Status */ => {
let var_707 =
Some(
Result::<crate::model::Status, smithy_xml::decode::XmlError>::Ok(
crate::model::Status::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_707);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_restore_managed_prefix_list_version(
inp: &[u8],
mut builder: crate::output::restore_managed_prefix_list_version_output::Builder,
) -> Result<
crate::output::restore_managed_prefix_list_version_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RestoreManagedPrefixListVersionResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RestoreManagedPrefixListVersionResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixList") /* PrefixList com.amazonaws.ec2#RestoreManagedPrefixListVersionOutput$PrefixList */ => {
let var_708 =
Some(
crate::xml_deser::deser_structure_managed_prefix_list(&mut tag)
?
)
;
builder = builder.set_prefix_list(var_708);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_revoke_client_vpn_ingress(
inp: &[u8],
mut builder: crate::output::revoke_client_vpn_ingress_output::Builder,
) -> Result<crate::output::revoke_client_vpn_ingress_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RevokeClientVpnIngressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RevokeClientVpnIngressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#RevokeClientVpnIngressOutput$Status */ => {
let var_709 =
Some(
crate::xml_deser::deser_structure_client_vpn_authorization_rule_status(&mut tag)
?
)
;
builder = builder.set_status(var_709);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_revoke_security_group_egress(
inp: &[u8],
mut builder: crate::output::revoke_security_group_egress_output::Builder,
) -> Result<crate::output::revoke_security_group_egress_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RevokeSecurityGroupEgressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RevokeSecurityGroupEgressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#RevokeSecurityGroupEgressOutput$Return */ => {
let var_710 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_710);
}
,
s if s.matches("unknownIpPermissionSet") /* UnknownIpPermissions com.amazonaws.ec2#RevokeSecurityGroupEgressOutput$UnknownIpPermissions */ => {
let var_711 =
Some(
crate::xml_deser::deser_list_ip_permission_list(&mut tag)
?
)
;
builder = builder.set_unknown_ip_permissions(var_711);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_revoke_security_group_ingress(
inp: &[u8],
mut builder: crate::output::revoke_security_group_ingress_output::Builder,
) -> Result<
crate::output::revoke_security_group_ingress_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RevokeSecurityGroupIngressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RevokeSecurityGroupIngressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#RevokeSecurityGroupIngressOutput$Return */ => {
let var_712 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_712);
}
,
s if s.matches("unknownIpPermissionSet") /* UnknownIpPermissions com.amazonaws.ec2#RevokeSecurityGroupIngressOutput$UnknownIpPermissions */ => {
let var_713 =
Some(
crate::xml_deser::deser_list_ip_permission_list(&mut tag)
?
)
;
builder = builder.set_unknown_ip_permissions(var_713);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_run_instances(
inp: &[u8],
mut builder: crate::output::run_instances_output::Builder,
) -> Result<crate::output::run_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RunInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RunInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#RunInstancesOutput$Groups */ => {
let var_714 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_714);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#RunInstancesOutput$Instances */ => {
let var_715 =
Some(
crate::xml_deser::deser_list_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_715);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#RunInstancesOutput$OwnerId */ => {
let var_716 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_716);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#RunInstancesOutput$RequesterId */ => {
let var_717 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_requester_id(var_717);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#RunInstancesOutput$ReservationId */ => {
let var_718 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reservation_id(var_718);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_run_scheduled_instances(
inp: &[u8],
mut builder: crate::output::run_scheduled_instances_output::Builder,
) -> Result<crate::output::run_scheduled_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("RunScheduledInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected RunScheduledInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceIdSet") /* InstanceIdSet com.amazonaws.ec2#RunScheduledInstancesOutput$InstanceIdSet */ => {
let var_719 =
Some(
crate::xml_deser::deser_list_instance_id_set(&mut tag)
?
)
;
builder = builder.set_instance_id_set(var_719);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_search_local_gateway_routes(
inp: &[u8],
mut builder: crate::output::search_local_gateway_routes_output::Builder,
) -> Result<crate::output::search_local_gateway_routes_output::Builder, smithy_xml::decode::XmlError>
{
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("SearchLocalGatewayRoutesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected SearchLocalGatewayRoutesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("routeSet") /* Routes com.amazonaws.ec2#SearchLocalGatewayRoutesOutput$Routes */ => {
let var_720 =
Some(
crate::xml_deser::deser_list_local_gateway_route_list(&mut tag)
?
)
;
builder = builder.set_routes(var_720);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#SearchLocalGatewayRoutesOutput$NextToken */ => {
let var_721 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_721);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_search_transit_gateway_multicast_groups(
inp: &[u8],
mut builder: crate::output::search_transit_gateway_multicast_groups_output::Builder,
) -> Result<
crate::output::search_transit_gateway_multicast_groups_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("SearchTransitGatewayMulticastGroupsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected SearchTransitGatewayMulticastGroupsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("multicastGroups") /* MulticastGroups com.amazonaws.ec2#SearchTransitGatewayMulticastGroupsOutput$MulticastGroups */ => {
let var_722 =
Some(
crate::xml_deser::deser_list_transit_gateway_multicast_group_list(&mut tag)
?
)
;
builder = builder.set_multicast_groups(var_722);
}
,
s if s.matches("nextToken") /* NextToken com.amazonaws.ec2#SearchTransitGatewayMulticastGroupsOutput$NextToken */ => {
let var_723 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_next_token(var_723);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_search_transit_gateway_routes(
inp: &[u8],
mut builder: crate::output::search_transit_gateway_routes_output::Builder,
) -> Result<
crate::output::search_transit_gateway_routes_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("SearchTransitGatewayRoutesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected SearchTransitGatewayRoutesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("routeSet") /* Routes com.amazonaws.ec2#SearchTransitGatewayRoutesOutput$Routes */ => {
let var_724 =
Some(
crate::xml_deser::deser_list_transit_gateway_route_list(&mut tag)
?
)
;
builder = builder.set_routes(var_724);
}
,
s if s.matches("additionalRoutesAvailable") /* AdditionalRoutesAvailable com.amazonaws.ec2#SearchTransitGatewayRoutesOutput$AdditionalRoutesAvailable */ => {
let var_725 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_additional_routes_available(var_725);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_start_instances(
inp: &[u8],
mut builder: crate::output::start_instances_output::Builder,
) -> Result<crate::output::start_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("StartInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected StartInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* StartingInstances com.amazonaws.ec2#StartInstancesOutput$StartingInstances */ => {
let var_726 =
Some(
crate::xml_deser::deser_list_instance_state_change_list(&mut tag)
?
)
;
builder = builder.set_starting_instances(var_726);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_start_network_insights_analysis(
inp: &[u8],
mut builder: crate::output::start_network_insights_analysis_output::Builder,
) -> Result<
crate::output::start_network_insights_analysis_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("StartNetworkInsightsAnalysisResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected StartNetworkInsightsAnalysisResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsAnalysis") /* NetworkInsightsAnalysis com.amazonaws.ec2#StartNetworkInsightsAnalysisOutput$NetworkInsightsAnalysis */ => {
let var_727 =
Some(
crate::xml_deser::deser_structure_network_insights_analysis(&mut tag)
?
)
;
builder = builder.set_network_insights_analysis(var_727);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_start_vpc_endpoint_service_private_dns_verification(
inp: &[u8],
mut builder: crate::output::start_vpc_endpoint_service_private_dns_verification_output::Builder,
) -> Result<
crate::output::start_vpc_endpoint_service_private_dns_verification_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("StartVpcEndpointServicePrivateDnsVerificationResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected StartVpcEndpointServicePrivateDnsVerificationResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* ReturnValue com.amazonaws.ec2#StartVpcEndpointServicePrivateDnsVerificationOutput$ReturnValue */ => {
let var_728 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return_value(var_728);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_stop_instances(
inp: &[u8],
mut builder: crate::output::stop_instances_output::Builder,
) -> Result<crate::output::stop_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("StopInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected StopInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* StoppingInstances com.amazonaws.ec2#StopInstancesOutput$StoppingInstances */ => {
let var_729 =
Some(
crate::xml_deser::deser_list_instance_state_change_list(&mut tag)
?
)
;
builder = builder.set_stopping_instances(var_729);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_terminate_client_vpn_connections(
inp: &[u8],
mut builder: crate::output::terminate_client_vpn_connections_output::Builder,
) -> Result<
crate::output::terminate_client_vpn_connections_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("TerminateClientVpnConnectionsResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected TerminateClientVpnConnectionsResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#TerminateClientVpnConnectionsOutput$ClientVpnEndpointId */ => {
let var_730 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_730);
}
,
s if s.matches("username") /* Username com.amazonaws.ec2#TerminateClientVpnConnectionsOutput$Username */ => {
let var_731 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_username(var_731);
}
,
s if s.matches("connectionStatuses") /* ConnectionStatuses com.amazonaws.ec2#TerminateClientVpnConnectionsOutput$ConnectionStatuses */ => {
let var_732 =
Some(
crate::xml_deser::deser_list_terminate_connection_status_set(&mut tag)
?
)
;
builder = builder.set_connection_statuses(var_732);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_terminate_instances(
inp: &[u8],
mut builder: crate::output::terminate_instances_output::Builder,
) -> Result<crate::output::terminate_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("TerminateInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected TerminateInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* TerminatingInstances com.amazonaws.ec2#TerminateInstancesOutput$TerminatingInstances */ => {
let var_733 =
Some(
crate::xml_deser::deser_list_instance_state_change_list(&mut tag)
?
)
;
builder = builder.set_terminating_instances(var_733);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_unassign_ipv6_addresses(
inp: &[u8],
mut builder: crate::output::unassign_ipv6_addresses_output::Builder,
) -> Result<crate::output::unassign_ipv6_addresses_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("UnassignIpv6AddressesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected UnassignIpv6AddressesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#UnassignIpv6AddressesOutput$NetworkInterfaceId */ => {
let var_734 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_734);
}
,
s if s.matches("unassignedIpv6Addresses") /* UnassignedIpv6Addresses com.amazonaws.ec2#UnassignIpv6AddressesOutput$UnassignedIpv6Addresses */ => {
let var_735 =
Some(
crate::xml_deser::deser_list_ipv6_address_list(&mut tag)
?
)
;
builder = builder.set_unassigned_ipv6_addresses(var_735);
}
,
s if s.matches("unassignedIpv6PrefixSet") /* UnassignedIpv6Prefixes com.amazonaws.ec2#UnassignIpv6AddressesOutput$UnassignedIpv6Prefixes */ => {
let var_736 =
Some(
crate::xml_deser::deser_list_ip_prefix_list(&mut tag)
?
)
;
builder = builder.set_unassigned_ipv6_prefixes(var_736);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_unmonitor_instances(
inp: &[u8],
mut builder: crate::output::unmonitor_instances_output::Builder,
) -> Result<crate::output::unmonitor_instances_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("UnmonitorInstancesResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected UnmonitorInstancesResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instancesSet") /* InstanceMonitorings com.amazonaws.ec2#UnmonitorInstancesOutput$InstanceMonitorings */ => {
let var_737 =
Some(
crate::xml_deser::deser_list_instance_monitoring_list(&mut tag)
?
)
;
builder = builder.set_instance_monitorings(var_737);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_update_security_group_rule_descriptions_egress(
inp: &[u8],
mut builder: crate::output::update_security_group_rule_descriptions_egress_output::Builder,
) -> Result<
crate::output::update_security_group_rule_descriptions_egress_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("UpdateSecurityGroupRuleDescriptionsEgressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected UpdateSecurityGroupRuleDescriptionsEgressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#UpdateSecurityGroupRuleDescriptionsEgressOutput$Return */ => {
let var_738 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_738);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_update_security_group_rule_descriptions_ingress(
inp: &[u8],
mut builder: crate::output::update_security_group_rule_descriptions_ingress_output::Builder,
) -> Result<
crate::output::update_security_group_rule_descriptions_ingress_output::Builder,
smithy_xml::decode::XmlError,
> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("UpdateSecurityGroupRuleDescriptionsIngressResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected UpdateSecurityGroupRuleDescriptionsIngressResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("return") /* Return com.amazonaws.ec2#UpdateSecurityGroupRuleDescriptionsIngressOutput$Return */ => {
let var_739 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_return(var_739);
}
,
_ => {}
}
}
Ok(builder)
}
#[allow(unused_mut)]
pub fn deser_operation_withdraw_byoip_cidr(
inp: &[u8],
mut builder: crate::output::withdraw_byoip_cidr_output::Builder,
) -> Result<crate::output::withdraw_byoip_cidr_output::Builder, smithy_xml::decode::XmlError> {
use std::convert::TryFrom;
let mut doc = smithy_xml::decode::Document::try_from(inp)?;
#[allow(unused_mut)]
let mut decoder = doc.root_element()?;
let start_el = decoder.start_el();
if !(start_el.matches("WithdrawByoipCidrResponse")) {
return Err(smithy_xml::decode::XmlError::custom(format!(
"invalid root, expected WithdrawByoipCidrResponse got {:?}",
start_el
)));
}
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("byoipCidr") /* ByoipCidr com.amazonaws.ec2#WithdrawByoipCidrOutput$ByoipCidr */ => {
let var_740 =
Some(
crate::xml_deser::deser_structure_byoip_cidr(&mut tag)
?
)
;
builder = builder.set_byoip_cidr(var_740);
}
,
_ => {}
}
}
Ok(builder)
}
pub fn deser_structure_transit_gateway_multicast_domain_associations(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastDomainAssociations, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDomainAssociations::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$TransitGatewayMulticastDomainId */ => {
let var_741 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_741);
}
,
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$TransitGatewayAttachmentId */ => {
let var_742 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_742);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$ResourceId */ => {
let var_743 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_743);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$ResourceType */ => {
let var_744 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_744);
}
,
s if s.matches("resourceOwnerId") /* ResourceOwnerId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$ResourceOwnerId */ => {
let var_745 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_owner_id(var_745);
}
,
s if s.matches("subnets") /* Subnets com.amazonaws.ec2#TransitGatewayMulticastDomainAssociations$Subnets */ => {
let var_746 =
Some(
crate::xml_deser::deser_list_subnet_association_list(&mut tag)
?
)
;
builder = builder.set_subnets(var_746);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_peering_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayPeeringAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayPeeringAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayPeeringAttachment$TransitGatewayAttachmentId */ => {
let var_747 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_747);
}
,
s if s.matches("requesterTgwInfo") /* RequesterTgwInfo com.amazonaws.ec2#TransitGatewayPeeringAttachment$RequesterTgwInfo */ => {
let var_748 =
Some(
crate::xml_deser::deser_structure_peering_tgw_info(&mut tag)
?
)
;
builder = builder.set_requester_tgw_info(var_748);
}
,
s if s.matches("accepterTgwInfo") /* AccepterTgwInfo com.amazonaws.ec2#TransitGatewayPeeringAttachment$AccepterTgwInfo */ => {
let var_749 =
Some(
crate::xml_deser::deser_structure_peering_tgw_info(&mut tag)
?
)
;
builder = builder.set_accepter_tgw_info(var_749);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#TransitGatewayPeeringAttachment$Status */ => {
let var_750 =
Some(
crate::xml_deser::deser_structure_peering_attachment_status(&mut tag)
?
)
;
builder = builder.set_status(var_750);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayPeeringAttachment$State */ => {
let var_751 =
Some(
Result::<crate::model::TransitGatewayAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_751);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayPeeringAttachment$CreationTime */ => {
let var_752 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_752);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayPeeringAttachment$Tags */ => {
let var_753 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_753);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_vpc_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayVpcAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayVpcAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayVpcAttachment$TransitGatewayAttachmentId */ => {
let var_754 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_754);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayVpcAttachment$TransitGatewayId */ => {
let var_755 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_755);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#TransitGatewayVpcAttachment$VpcId */ => {
let var_756 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_756);
}
,
s if s.matches("vpcOwnerId") /* VpcOwnerId com.amazonaws.ec2#TransitGatewayVpcAttachment$VpcOwnerId */ => {
let var_757 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_owner_id(var_757);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayVpcAttachment$State */ => {
let var_758 =
Some(
Result::<crate::model::TransitGatewayAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_758);
}
,
s if s.matches("subnetIds") /* SubnetIds com.amazonaws.ec2#TransitGatewayVpcAttachment$SubnetIds */ => {
let var_759 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_subnet_ids(var_759);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayVpcAttachment$CreationTime */ => {
let var_760 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_760);
}
,
s if s.matches("options") /* Options com.amazonaws.ec2#TransitGatewayVpcAttachment$Options */ => {
let var_761 =
Some(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment_options(&mut tag)
?
)
;
builder = builder.set_options(var_761);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayVpcAttachment$Tags */ => {
let var_762 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_762);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_unsuccessful_item_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::UnsuccessfulItem>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UnsuccessfulItemSet$member */ => {
out.push(
crate::xml_deser::deser_structure_unsuccessful_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_vpc_peering_connection(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcPeeringConnection, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcPeeringConnection::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accepterVpcInfo") /* AccepterVpcInfo com.amazonaws.ec2#VpcPeeringConnection$AccepterVpcInfo */ => {
let var_763 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection_vpc_info(&mut tag)
?
)
;
builder = builder.set_accepter_vpc_info(var_763);
}
,
s if s.matches("expirationTime") /* ExpirationTime com.amazonaws.ec2#VpcPeeringConnection$ExpirationTime */ => {
let var_764 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_expiration_time(var_764);
}
,
s if s.matches("requesterVpcInfo") /* RequesterVpcInfo com.amazonaws.ec2#VpcPeeringConnection$RequesterVpcInfo */ => {
let var_765 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection_vpc_info(&mut tag)
?
)
;
builder = builder.set_requester_vpc_info(var_765);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#VpcPeeringConnection$Status */ => {
let var_766 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection_state_reason(&mut tag)
?
)
;
builder = builder.set_status(var_766);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpcPeeringConnection$Tags */ => {
let var_767 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_767);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#VpcPeeringConnection$VpcPeeringConnectionId */ => {
let var_768 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_768);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_byoip_cidr(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ByoipCidr, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ByoipCidr::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#ByoipCidr$Cidr */ => {
let var_769 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_769);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ByoipCidr$Description */ => {
let var_770 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_770);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ByoipCidr$StatusMessage */ => {
let var_771 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_771);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#ByoipCidr$State */ => {
let var_772 =
Some(
Result::<crate::model::ByoipCidrState, smithy_xml::decode::XmlError>::Ok(
crate::model::ByoipCidrState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_772);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_response_host_id_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ResponseHostIdList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_client_vpn_security_group_id_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClientVpnSecurityGroupIdSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6AddressList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ip_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IpPrefixList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_assigned_private_ip_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AssignedPrivateIpAddress>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AssignedPrivateIpAddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_assigned_private_ip_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv4_prefixes_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv4PrefixSpecification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv4PrefixesList$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv4_prefix_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_association_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AssociationStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AssociationStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#AssociationStatus$Code */ => {
let var_773 =
Some(
Result::<crate::model::AssociationStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::AssociationStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_773);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#AssociationStatus$Message */ => {
let var_774 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_774);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_iam_instance_profile_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IamInstanceProfileAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IamInstanceProfileAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#IamInstanceProfileAssociation$AssociationId */ => {
let var_775 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_775);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#IamInstanceProfileAssociation$InstanceId */ => {
let var_776 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_776);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#IamInstanceProfileAssociation$IamInstanceProfile */ => {
let var_777 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_777);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#IamInstanceProfileAssociation$State */ => {
let var_778 =
Some(
Result::<crate::model::IamInstanceProfileAssociationState, smithy_xml::decode::XmlError>::Ok(
crate::model::IamInstanceProfileAssociationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_778);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#IamInstanceProfileAssociation$Timestamp */ => {
let var_779 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_779);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_event_window(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceEventWindow, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceEventWindow::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindowId") /* InstanceEventWindowId com.amazonaws.ec2#InstanceEventWindow$InstanceEventWindowId */ => {
let var_780 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_event_window_id(var_780);
}
,
s if s.matches("timeRangeSet") /* TimeRanges com.amazonaws.ec2#InstanceEventWindow$TimeRanges */ => {
let var_781 =
Some(
crate::xml_deser::deser_list_instance_event_window_time_range_list(&mut tag)
?
)
;
builder = builder.set_time_ranges(var_781);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#InstanceEventWindow$Name */ => {
let var_782 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_782);
}
,
s if s.matches("cronExpression") /* CronExpression com.amazonaws.ec2#InstanceEventWindow$CronExpression */ => {
let var_783 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cron_expression(var_783);
}
,
s if s.matches("associationTarget") /* AssociationTarget com.amazonaws.ec2#InstanceEventWindow$AssociationTarget */ => {
let var_784 =
Some(
crate::xml_deser::deser_structure_instance_event_window_association_target(&mut tag)
?
)
;
builder = builder.set_association_target(var_784);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#InstanceEventWindow$State */ => {
let var_785 =
Some(
Result::<crate::model::InstanceEventWindowState, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceEventWindowState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_785);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#InstanceEventWindow$Tags */ => {
let var_786 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_786);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_route_table_association_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RouteTableAssociationState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::RouteTableAssociationState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#RouteTableAssociationState$State */ => {
let var_787 =
Some(
Result::<crate::model::RouteTableAssociationStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::RouteTableAssociationStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_787);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#RouteTableAssociationState$StatusMessage */ => {
let var_788 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_788);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_subnet_ipv6_cidr_block_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SubnetIpv6CidrBlockAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SubnetIpv6CidrBlockAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#SubnetIpv6CidrBlockAssociation$AssociationId */ => {
let var_789 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_789);
}
,
s if s.matches("ipv6CidrBlock") /* Ipv6CidrBlock com.amazonaws.ec2#SubnetIpv6CidrBlockAssociation$Ipv6CidrBlock */ => {
let var_790 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_cidr_block(var_790);
}
,
s if s.matches("ipv6CidrBlockState") /* Ipv6CidrBlockState com.amazonaws.ec2#SubnetIpv6CidrBlockAssociation$Ipv6CidrBlockState */ => {
let var_791 =
Some(
crate::xml_deser::deser_structure_subnet_cidr_block_state(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_state(var_791);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayAssociation$TransitGatewayRouteTableId */ => {
let var_792 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_792);
}
,
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayAssociation$TransitGatewayAttachmentId */ => {
let var_793 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_793);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayAssociation$ResourceId */ => {
let var_794 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_794);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayAssociation$ResourceType */ => {
let var_795 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_795);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayAssociation$State */ => {
let var_796 =
Some(
Result::<crate::model::TransitGatewayAssociationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAssociationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_796);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_trunk_interface_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrunkInterfaceAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrunkInterfaceAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#TrunkInterfaceAssociation$AssociationId */ => {
let var_797 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_797);
}
,
s if s.matches("branchInterfaceId") /* BranchInterfaceId com.amazonaws.ec2#TrunkInterfaceAssociation$BranchInterfaceId */ => {
let var_798 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_branch_interface_id(var_798);
}
,
s if s.matches("trunkInterfaceId") /* TrunkInterfaceId com.amazonaws.ec2#TrunkInterfaceAssociation$TrunkInterfaceId */ => {
let var_799 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_trunk_interface_id(var_799);
}
,
s if s.matches("interfaceProtocol") /* InterfaceProtocol com.amazonaws.ec2#TrunkInterfaceAssociation$InterfaceProtocol */ => {
let var_800 =
Some(
Result::<crate::model::InterfaceProtocolType, smithy_xml::decode::XmlError>::Ok(
crate::model::InterfaceProtocolType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_interface_protocol(var_800);
}
,
s if s.matches("vlanId") /* VlanId com.amazonaws.ec2#TrunkInterfaceAssociation$VlanId */ => {
let var_801 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_vlan_id(var_801);
}
,
s if s.matches("greKey") /* GreKey com.amazonaws.ec2#TrunkInterfaceAssociation$GreKey */ => {
let var_802 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_gre_key(var_802);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TrunkInterfaceAssociation$Tags */ => {
let var_803 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_803);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_ipv6_cidr_block_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcIpv6CidrBlockAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcIpv6CidrBlockAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#VpcIpv6CidrBlockAssociation$AssociationId */ => {
let var_804 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_804);
}
,
s if s.matches("ipv6CidrBlock") /* Ipv6CidrBlock com.amazonaws.ec2#VpcIpv6CidrBlockAssociation$Ipv6CidrBlock */ => {
let var_805 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_cidr_block(var_805);
}
,
s if s.matches("ipv6CidrBlockState") /* Ipv6CidrBlockState com.amazonaws.ec2#VpcIpv6CidrBlockAssociation$Ipv6CidrBlockState */ => {
let var_806 =
Some(
crate::xml_deser::deser_structure_vpc_cidr_block_state(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_state(var_806);
}
,
s if s.matches("networkBorderGroup") /* NetworkBorderGroup com.amazonaws.ec2#VpcIpv6CidrBlockAssociation$NetworkBorderGroup */ => {
let var_807 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_border_group(var_807);
}
,
s if s.matches("ipv6Pool") /* Ipv6Pool com.amazonaws.ec2#VpcIpv6CidrBlockAssociation$Ipv6Pool */ => {
let var_808 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_pool(var_808);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_cidr_block_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcCidrBlockAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcCidrBlockAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#VpcCidrBlockAssociation$AssociationId */ => {
let var_809 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_809);
}
,
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#VpcCidrBlockAssociation$CidrBlock */ => {
let var_810 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_810);
}
,
s if s.matches("cidrBlockState") /* CidrBlockState com.amazonaws.ec2#VpcCidrBlockAssociation$CidrBlockState */ => {
let var_811 =
Some(
crate::xml_deser::deser_structure_vpc_cidr_block_state(&mut tag)
?
)
;
builder = builder.set_cidr_block_state(var_811);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#VpcAttachment$State */ => {
let var_812 =
Some(
Result::<crate::model::AttachmentStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AttachmentStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_812);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#VpcAttachment$VpcId */ => {
let var_813 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_813);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_authorization_rule_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnAuthorizationRuleStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnAuthorizationRuleStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientVpnAuthorizationRuleStatus$Code */ => {
let var_814 =
Some(
Result::<crate::model::ClientVpnAuthorizationRuleStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnAuthorizationRuleStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_814);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientVpnAuthorizationRuleStatus$Message */ => {
let var_815 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_815);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_security_group_rule_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SecurityGroupRule>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SecurityGroupRuleList$member */ => {
out.push(
crate::xml_deser::deser_structure_security_group_rule(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_bundle_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::BundleTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::BundleTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bundleId") /* BundleId com.amazonaws.ec2#BundleTask$BundleId */ => {
let var_816 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bundle_id(var_816);
}
,
s if s.matches("error") /* BundleTaskError com.amazonaws.ec2#BundleTask$BundleTaskError */ => {
let var_817 =
Some(
crate::xml_deser::deser_structure_bundle_task_error(&mut tag)
?
)
;
builder = builder.set_bundle_task_error(var_817);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#BundleTask$InstanceId */ => {
let var_818 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_818);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#BundleTask$Progress */ => {
let var_819 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_819);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#BundleTask$StartTime */ => {
let var_820 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_820);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#BundleTask$State */ => {
let var_821 =
Some(
Result::<crate::model::BundleTaskState, smithy_xml::decode::XmlError>::Ok(
crate::model::BundleTaskState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_821);
}
,
s if s.matches("storage") /* Storage com.amazonaws.ec2#BundleTask$Storage */ => {
let var_822 =
Some(
crate::xml_deser::deser_structure_storage(&mut tag)
?
)
;
builder = builder.set_storage(var_822);
}
,
s if s.matches("updateTime") /* UpdateTime com.amazonaws.ec2#BundleTask$UpdateTime */ => {
let var_823 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_update_time(var_823);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_reserved_instances_listing_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReservedInstancesListing>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstancesListingList$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances_listing(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_cancel_spot_fleet_requests_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::CancelSpotFleetRequestsSuccessItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CancelSpotFleetRequestsSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_cancel_spot_fleet_requests_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_cancel_spot_fleet_requests_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::CancelSpotFleetRequestsErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CancelSpotFleetRequestsErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_cancel_spot_fleet_requests_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_cancelled_spot_instance_request_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CancelledSpotInstanceRequest>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CancelledSpotInstanceRequestList$member */ => {
out.push(
crate::xml_deser::deser_structure_cancelled_spot_instance_request(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_tag_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Tag>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TagList$member */ => {
out.push(
crate::xml_deser::deser_structure_tag(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_capacity_reservation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservation$CapacityReservationId */ => {
let var_824 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_824);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservation$OwnerId */ => {
let var_825 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_825);
}
,
s if s.matches("capacityReservationArn") /* CapacityReservationArn com.amazonaws.ec2#CapacityReservation$CapacityReservationArn */ => {
let var_826 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_arn(var_826);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId */ => {
let var_827 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_827);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CapacityReservation$InstanceType */ => {
let var_828 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_828);
}
,
s if s.matches("instancePlatform") /* InstancePlatform com.amazonaws.ec2#CapacityReservation$InstancePlatform */ => {
let var_829 =
Some(
Result::<crate::model::CapacityReservationInstancePlatform, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationInstancePlatform::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_platform(var_829);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#CapacityReservation$AvailabilityZone */ => {
let var_830 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_830);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#CapacityReservation$Tenancy */ => {
let var_831 =
Some(
Result::<crate::model::CapacityReservationTenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationTenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_831);
}
,
s if s.matches("totalInstanceCount") /* TotalInstanceCount com.amazonaws.ec2#CapacityReservation$TotalInstanceCount */ => {
let var_832 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_instance_count(var_832);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount */ => {
let var_833 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_833);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#CapacityReservation$EbsOptimized */ => {
let var_834 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_834);
}
,
s if s.matches("ephemeralStorage") /* EphemeralStorage com.amazonaws.ec2#CapacityReservation$EphemeralStorage */ => {
let var_835 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ephemeral_storage(var_835);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CapacityReservation$State */ => {
let var_836 =
Some(
Result::<crate::model::CapacityReservationState, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_836);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#CapacityReservation$StartDate */ => {
let var_837 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_837);
}
,
s if s.matches("endDate") /* EndDate com.amazonaws.ec2#CapacityReservation$EndDate */ => {
let var_838 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_date(var_838);
}
,
s if s.matches("endDateType") /* EndDateType com.amazonaws.ec2#CapacityReservation$EndDateType */ => {
let var_839 =
Some(
Result::<crate::model::EndDateType, smithy_xml::decode::XmlError>::Ok(
crate::model::EndDateType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_date_type(var_839);
}
,
s if s.matches("instanceMatchCriteria") /* InstanceMatchCriteria com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria */ => {
let var_840 =
Some(
Result::<crate::model::InstanceMatchCriteria, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceMatchCriteria::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_match_criteria(var_840);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#CapacityReservation$CreateDate */ => {
let var_841 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_841);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CapacityReservation$Tags */ => {
let var_842 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_842);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#CapacityReservation$OutpostArn */ => {
let var_843 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_843);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_carrier_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CarrierGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CarrierGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("carrierGatewayId") /* CarrierGatewayId com.amazonaws.ec2#CarrierGateway$CarrierGatewayId */ => {
let var_844 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_gateway_id(var_844);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#CarrierGateway$VpcId */ => {
let var_845 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_845);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CarrierGateway$State */ => {
let var_846 =
Some(
Result::<crate::model::CarrierGatewayState, smithy_xml::decode::XmlError>::Ok(
crate::model::CarrierGatewayState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_846);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CarrierGateway$OwnerId */ => {
let var_847 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_847);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CarrierGateway$Tags */ => {
let var_848 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_848);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_endpoint_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnEndpointStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnEndpointStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientVpnEndpointStatus$Code */ => {
let var_849 =
Some(
Result::<crate::model::ClientVpnEndpointStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnEndpointStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_849);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientVpnEndpointStatus$Message */ => {
let var_850 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_850);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_route_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnRouteStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnRouteStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientVpnRouteStatus$Code */ => {
let var_851 =
Some(
Result::<crate::model::ClientVpnRouteStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnRouteStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_851);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientVpnRouteStatus$Message */ => {
let var_852 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_852);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_customer_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CustomerGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CustomerGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bgpAsn") /* BgpAsn com.amazonaws.ec2#CustomerGateway$BgpAsn */ => {
let var_853 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bgp_asn(var_853);
}
,
s if s.matches("customerGatewayId") /* CustomerGatewayId com.amazonaws.ec2#CustomerGateway$CustomerGatewayId */ => {
let var_854 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_gateway_id(var_854);
}
,
s if s.matches("ipAddress") /* IpAddress com.amazonaws.ec2#CustomerGateway$IpAddress */ => {
let var_855 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_address(var_855);
}
,
s if s.matches("certificateArn") /* CertificateArn com.amazonaws.ec2#CustomerGateway$CertificateArn */ => {
let var_856 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_arn(var_856);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CustomerGateway$State */ => {
let var_857 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_857);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#CustomerGateway$Type */ => {
let var_858 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_type(var_858);
}
,
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#CustomerGateway$DeviceName */ => {
let var_859 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_name(var_859);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CustomerGateway$Tags */ => {
let var_860 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_860);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_subnet(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Subnet, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Subnet::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Subnet$AvailabilityZone */ => {
let var_861 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_861);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#Subnet$AvailabilityZoneId */ => {
let var_862 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_862);
}
,
s if s.matches("availableIpAddressCount") /* AvailableIpAddressCount com.amazonaws.ec2#Subnet$AvailableIpAddressCount */ => {
let var_863 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_ip_address_count(var_863);
}
,
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#Subnet$CidrBlock */ => {
let var_864 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_864);
}
,
s if s.matches("defaultForAz") /* DefaultForAz com.amazonaws.ec2#Subnet$DefaultForAz */ => {
let var_865 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_default_for_az(var_865);
}
,
s if s.matches("mapPublicIpOnLaunch") /* MapPublicIpOnLaunch com.amazonaws.ec2#Subnet$MapPublicIpOnLaunch */ => {
let var_866 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_map_public_ip_on_launch(var_866);
}
,
s if s.matches("mapCustomerOwnedIpOnLaunch") /* MapCustomerOwnedIpOnLaunch com.amazonaws.ec2#Subnet$MapCustomerOwnedIpOnLaunch */ => {
let var_867 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_map_customer_owned_ip_on_launch(var_867);
}
,
s if s.matches("customerOwnedIpv4Pool") /* CustomerOwnedIpv4Pool com.amazonaws.ec2#Subnet$CustomerOwnedIpv4Pool */ => {
let var_868 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ipv4_pool(var_868);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Subnet$State */ => {
let var_869 =
Some(
Result::<crate::model::SubnetState, smithy_xml::decode::XmlError>::Ok(
crate::model::SubnetState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_869);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#Subnet$SubnetId */ => {
let var_870 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_870);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#Subnet$VpcId */ => {
let var_871 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_871);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Subnet$OwnerId */ => {
let var_872 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_872);
}
,
s if s.matches("assignIpv6AddressOnCreation") /* AssignIpv6AddressOnCreation com.amazonaws.ec2#Subnet$AssignIpv6AddressOnCreation */ => {
let var_873 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_assign_ipv6_address_on_creation(var_873);
}
,
s if s.matches("ipv6CidrBlockAssociationSet") /* Ipv6CidrBlockAssociationSet com.amazonaws.ec2#Subnet$Ipv6CidrBlockAssociationSet */ => {
let var_874 =
Some(
crate::xml_deser::deser_list_subnet_ipv6_cidr_block_association_set(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association_set(var_874);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Subnet$Tags */ => {
let var_875 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_875);
}
,
s if s.matches("subnetArn") /* SubnetArn com.amazonaws.ec2#Subnet$SubnetArn */ => {
let var_876 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_arn(var_876);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Subnet$OutpostArn */ => {
let var_877 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_877);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Vpc, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Vpc::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#Vpc$CidrBlock */ => {
let var_878 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_878);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#Vpc$DhcpOptionsId */ => {
let var_879 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dhcp_options_id(var_879);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Vpc$State */ => {
let var_880 =
Some(
Result::<crate::model::VpcState, smithy_xml::decode::XmlError>::Ok(
crate::model::VpcState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_880);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#Vpc$VpcId */ => {
let var_881 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_881);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Vpc$OwnerId */ => {
let var_882 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_882);
}
,
s if s.matches("instanceTenancy") /* InstanceTenancy com.amazonaws.ec2#Vpc$InstanceTenancy */ => {
let var_883 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_tenancy(var_883);
}
,
s if s.matches("ipv6CidrBlockAssociationSet") /* Ipv6CidrBlockAssociationSet com.amazonaws.ec2#Vpc$Ipv6CidrBlockAssociationSet */ => {
let var_884 =
Some(
crate::xml_deser::deser_list_vpc_ipv6_cidr_block_association_set(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_association_set(var_884);
}
,
s if s.matches("cidrBlockAssociationSet") /* CidrBlockAssociationSet com.amazonaws.ec2#Vpc$CidrBlockAssociationSet */ => {
let var_885 =
Some(
crate::xml_deser::deser_list_vpc_cidr_block_association_set(&mut tag)
?
)
;
builder = builder.set_cidr_block_association_set(var_885);
}
,
s if s.matches("isDefault") /* IsDefault com.amazonaws.ec2#Vpc$IsDefault */ => {
let var_886 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_is_default(var_886);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Vpc$Tags */ => {
let var_887 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_887);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_dhcp_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_888 =
Some(
crate::xml_deser::deser_list_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_888);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_889 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dhcp_options_id(var_889);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_890 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_890);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_891 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_891);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_egress_only_internet_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EgressOnlyInternetGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EgressOnlyInternetGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentSet") /* Attachments com.amazonaws.ec2#EgressOnlyInternetGateway$Attachments */ => {
let var_892 =
Some(
crate::xml_deser::deser_list_internet_gateway_attachment_list(&mut tag)
?
)
;
builder = builder.set_attachments(var_892);
}
,
s if s.matches("egressOnlyInternetGatewayId") /* EgressOnlyInternetGatewayId com.amazonaws.ec2#EgressOnlyInternetGateway$EgressOnlyInternetGatewayId */ => {
let var_893 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_egress_only_internet_gateway_id(var_893);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#EgressOnlyInternetGateway$Tags */ => {
let var_894 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_894);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_create_fleet_errors_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CreateFleetError>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CreateFleetErrorsSet$member */ => {
out.push(
crate::xml_deser::deser_structure_create_fleet_error(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_create_fleet_instances_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CreateFleetInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CreateFleetInstancesSet$member */ => {
out.push(
crate::xml_deser::deser_structure_create_fleet_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_value_string_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ValueStringList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_export_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ExportTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ExportTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ExportTask$Description */ => {
let var_895 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_895);
}
,
s if s.matches("exportTaskId") /* ExportTaskId com.amazonaws.ec2#ExportTask$ExportTaskId */ => {
let var_896 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_export_task_id(var_896);
}
,
s if s.matches("exportToS3") /* ExportToS3Task com.amazonaws.ec2#ExportTask$ExportToS3Task */ => {
let var_897 =
Some(
crate::xml_deser::deser_structure_export_to_s3_task(&mut tag)
?
)
;
builder = builder.set_export_to_s3_task(var_897);
}
,
s if s.matches("instanceExport") /* InstanceExportDetails com.amazonaws.ec2#ExportTask$InstanceExportDetails */ => {
let var_898 =
Some(
crate::xml_deser::deser_structure_instance_export_details(&mut tag)
?
)
;
builder = builder.set_instance_export_details(var_898);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#ExportTask$State */ => {
let var_899 =
Some(
Result::<crate::model::ExportTaskState, smithy_xml::decode::XmlError>::Ok(
crate::model::ExportTaskState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_899);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ExportTask$StatusMessage */ => {
let var_900 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_900);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ExportTask$Tags */ => {
let var_901 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_901);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_internet_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InternetGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InternetGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentSet") /* Attachments com.amazonaws.ec2#InternetGateway$Attachments */ => {
let var_902 =
Some(
crate::xml_deser::deser_list_internet_gateway_attachment_list(&mut tag)
?
)
;
builder = builder.set_attachments(var_902);
}
,
s if s.matches("internetGatewayId") /* InternetGatewayId com.amazonaws.ec2#InternetGateway$InternetGatewayId */ => {
let var_903 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_internet_gateway_id(var_903);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#InternetGateway$OwnerId */ => {
let var_904 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_904);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#InternetGateway$Tags */ => {
let var_905 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_905);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplate, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplate::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateId") /* LaunchTemplateId com.amazonaws.ec2#LaunchTemplate$LaunchTemplateId */ => {
let var_906 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_id(var_906);
}
,
s if s.matches("launchTemplateName") /* LaunchTemplateName com.amazonaws.ec2#LaunchTemplate$LaunchTemplateName */ => {
let var_907 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_name(var_907);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#LaunchTemplate$CreateTime */ => {
let var_908 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_908);
}
,
s if s.matches("createdBy") /* CreatedBy com.amazonaws.ec2#LaunchTemplate$CreatedBy */ => {
let var_909 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_created_by(var_909);
}
,
s if s.matches("defaultVersionNumber") /* DefaultVersionNumber com.amazonaws.ec2#LaunchTemplate$DefaultVersionNumber */ => {
let var_910 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_default_version_number(var_910);
}
,
s if s.matches("latestVersionNumber") /* LatestVersionNumber com.amazonaws.ec2#LaunchTemplate$LatestVersionNumber */ => {
let var_911 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_latest_version_number(var_911);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LaunchTemplate$Tags */ => {
let var_912 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_912);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_validation_warning(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ValidationWarning, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ValidationWarning::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("errorSet") /* Errors com.amazonaws.ec2#ValidationWarning$Errors */ => {
let var_913 =
Some(
crate::xml_deser::deser_list_error_set(&mut tag)
?
)
;
builder = builder.set_errors(var_913);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_version(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateVersion, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateVersion::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateId") /* LaunchTemplateId com.amazonaws.ec2#LaunchTemplateVersion$LaunchTemplateId */ => {
let var_914 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_id(var_914);
}
,
s if s.matches("launchTemplateName") /* LaunchTemplateName com.amazonaws.ec2#LaunchTemplateVersion$LaunchTemplateName */ => {
let var_915 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_name(var_915);
}
,
s if s.matches("versionNumber") /* VersionNumber com.amazonaws.ec2#LaunchTemplateVersion$VersionNumber */ => {
let var_916 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_version_number(var_916);
}
,
s if s.matches("versionDescription") /* VersionDescription com.amazonaws.ec2#LaunchTemplateVersion$VersionDescription */ => {
let var_917 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version_description(var_917);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#LaunchTemplateVersion$CreateTime */ => {
let var_918 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_918);
}
,
s if s.matches("createdBy") /* CreatedBy com.amazonaws.ec2#LaunchTemplateVersion$CreatedBy */ => {
let var_919 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_created_by(var_919);
}
,
s if s.matches("defaultVersion") /* DefaultVersion com.amazonaws.ec2#LaunchTemplateVersion$DefaultVersion */ => {
let var_920 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_default_version(var_920);
}
,
s if s.matches("launchTemplateData") /* LaunchTemplateData com.amazonaws.ec2#LaunchTemplateVersion$LaunchTemplateData */ => {
let var_921 =
Some(
crate::xml_deser::deser_structure_response_launch_template_data(&mut tag)
?
)
;
builder = builder.set_launch_template_data(var_921);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGatewayRoute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGatewayRoute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#LocalGatewayRoute$DestinationCidrBlock */ => {
let var_922 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr_block(var_922);
}
,
s if s.matches("localGatewayVirtualInterfaceGroupId") /* LocalGatewayVirtualInterfaceGroupId com.amazonaws.ec2#LocalGatewayRoute$LocalGatewayVirtualInterfaceGroupId */ => {
let var_923 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_virtual_interface_group_id(var_923);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#LocalGatewayRoute$Type */ => {
let var_924 =
Some(
Result::<crate::model::LocalGatewayRouteType, smithy_xml::decode::XmlError>::Ok(
crate::model::LocalGatewayRouteType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_924);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#LocalGatewayRoute$State */ => {
let var_925 =
Some(
Result::<crate::model::LocalGatewayRouteState, smithy_xml::decode::XmlError>::Ok(
crate::model::LocalGatewayRouteState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_925);
}
,
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#LocalGatewayRoute$LocalGatewayRouteTableId */ => {
let var_926 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_926);
}
,
s if s.matches("localGatewayRouteTableArn") /* LocalGatewayRouteTableArn com.amazonaws.ec2#LocalGatewayRoute$LocalGatewayRouteTableArn */ => {
let var_927 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_arn(var_927);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayRoute$OwnerId */ => {
let var_928 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_928);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_route_table_vpc_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGatewayRouteTableVpcAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGatewayRouteTableVpcAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVpcAssociationId") /* LocalGatewayRouteTableVpcAssociationId com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$LocalGatewayRouteTableVpcAssociationId */ => {
let var_929 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_vpc_association_id(var_929);
}
,
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$LocalGatewayRouteTableId */ => {
let var_930 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_930);
}
,
s if s.matches("localGatewayRouteTableArn") /* LocalGatewayRouteTableArn com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$LocalGatewayRouteTableArn */ => {
let var_931 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_arn(var_931);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$LocalGatewayId */ => {
let var_932 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_932);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$VpcId */ => {
let var_933 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_933);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$OwnerId */ => {
let var_934 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_934);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$State */ => {
let var_935 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_935);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociation$Tags */ => {
let var_936 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_936);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_managed_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ManagedPrefixList, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ManagedPrefixList::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#ManagedPrefixList$PrefixListId */ => {
let var_937 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_937);
}
,
s if s.matches("addressFamily") /* AddressFamily com.amazonaws.ec2#ManagedPrefixList$AddressFamily */ => {
let var_938 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_address_family(var_938);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#ManagedPrefixList$State */ => {
let var_939 =
Some(
Result::<crate::model::PrefixListState, smithy_xml::decode::XmlError>::Ok(
crate::model::PrefixListState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_939);
}
,
s if s.matches("stateMessage") /* StateMessage com.amazonaws.ec2#ManagedPrefixList$StateMessage */ => {
let var_940 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_message(var_940);
}
,
s if s.matches("prefixListArn") /* PrefixListArn com.amazonaws.ec2#ManagedPrefixList$PrefixListArn */ => {
let var_941 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_arn(var_941);
}
,
s if s.matches("prefixListName") /* PrefixListName com.amazonaws.ec2#ManagedPrefixList$PrefixListName */ => {
let var_942 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_name(var_942);
}
,
s if s.matches("maxEntries") /* MaxEntries com.amazonaws.ec2#ManagedPrefixList$MaxEntries */ => {
let var_943 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_max_entries(var_943);
}
,
s if s.matches("version") /* Version com.amazonaws.ec2#ManagedPrefixList$Version */ => {
let var_944 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_version(var_944);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ManagedPrefixList$Tags */ => {
let var_945 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_945);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#ManagedPrefixList$OwnerId */ => {
let var_946 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_946);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_nat_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NatGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NatGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#NatGateway$CreateTime */ => {
let var_947 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_947);
}
,
s if s.matches("deleteTime") /* DeleteTime com.amazonaws.ec2#NatGateway$DeleteTime */ => {
let var_948 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_delete_time(var_948);
}
,
s if s.matches("failureCode") /* FailureCode com.amazonaws.ec2#NatGateway$FailureCode */ => {
let var_949 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_failure_code(var_949);
}
,
s if s.matches("failureMessage") /* FailureMessage com.amazonaws.ec2#NatGateway$FailureMessage */ => {
let var_950 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_failure_message(var_950);
}
,
s if s.matches("natGatewayAddressSet") /* NatGatewayAddresses com.amazonaws.ec2#NatGateway$NatGatewayAddresses */ => {
let var_951 =
Some(
crate::xml_deser::deser_list_nat_gateway_address_list(&mut tag)
?
)
;
builder = builder.set_nat_gateway_addresses(var_951);
}
,
s if s.matches("natGatewayId") /* NatGatewayId com.amazonaws.ec2#NatGateway$NatGatewayId */ => {
let var_952 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_nat_gateway_id(var_952);
}
,
s if s.matches("provisionedBandwidth") /* ProvisionedBandwidth com.amazonaws.ec2#NatGateway$ProvisionedBandwidth */ => {
let var_953 =
Some(
crate::xml_deser::deser_structure_provisioned_bandwidth(&mut tag)
?
)
;
builder = builder.set_provisioned_bandwidth(var_953);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#NatGateway$State */ => {
let var_954 =
Some(
Result::<crate::model::NatGatewayState, smithy_xml::decode::XmlError>::Ok(
crate::model::NatGatewayState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_954);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#NatGateway$SubnetId */ => {
let var_955 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_955);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#NatGateway$VpcId */ => {
let var_956 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_956);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#NatGateway$Tags */ => {
let var_957 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_957);
}
,
s if s.matches("connectivityType") /* ConnectivityType com.amazonaws.ec2#NatGateway$ConnectivityType */ => {
let var_958 =
Some(
Result::<crate::model::ConnectivityType, smithy_xml::decode::XmlError>::Ok(
crate::model::ConnectivityType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_connectivity_type(var_958);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_acl(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkAcl, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkAcl::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationSet") /* Associations com.amazonaws.ec2#NetworkAcl$Associations */ => {
let var_959 =
Some(
crate::xml_deser::deser_list_network_acl_association_list(&mut tag)
?
)
;
builder = builder.set_associations(var_959);
}
,
s if s.matches("entrySet") /* Entries com.amazonaws.ec2#NetworkAcl$Entries */ => {
let var_960 =
Some(
crate::xml_deser::deser_list_network_acl_entry_list(&mut tag)
?
)
;
builder = builder.set_entries(var_960);
}
,
s if s.matches("default") /* IsDefault com.amazonaws.ec2#NetworkAcl$IsDefault */ => {
let var_961 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_is_default(var_961);
}
,
s if s.matches("networkAclId") /* NetworkAclId com.amazonaws.ec2#NetworkAcl$NetworkAclId */ => {
let var_962 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_acl_id(var_962);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#NetworkAcl$Tags */ => {
let var_963 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_963);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#NetworkAcl$VpcId */ => {
let var_964 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_964);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#NetworkAcl$OwnerId */ => {
let var_965 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_965);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_insights_path(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInsightsPath, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInsightsPath::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsPathId") /* NetworkInsightsPathId com.amazonaws.ec2#NetworkInsightsPath$NetworkInsightsPathId */ => {
let var_966 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_path_id(var_966);
}
,
s if s.matches("networkInsightsPathArn") /* NetworkInsightsPathArn com.amazonaws.ec2#NetworkInsightsPath$NetworkInsightsPathArn */ => {
let var_967 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_path_arn(var_967);
}
,
s if s.matches("createdDate") /* CreatedDate com.amazonaws.ec2#NetworkInsightsPath$CreatedDate */ => {
let var_968 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_created_date(var_968);
}
,
s if s.matches("source") /* Source com.amazonaws.ec2#NetworkInsightsPath$Source */ => {
let var_969 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source(var_969);
}
,
s if s.matches("destination") /* Destination com.amazonaws.ec2#NetworkInsightsPath$Destination */ => {
let var_970 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination(var_970);
}
,
s if s.matches("sourceIp") /* SourceIp com.amazonaws.ec2#NetworkInsightsPath$SourceIp */ => {
let var_971 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_ip(var_971);
}
,
s if s.matches("destinationIp") /* DestinationIp com.amazonaws.ec2#NetworkInsightsPath$DestinationIp */ => {
let var_972 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_ip(var_972);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#NetworkInsightsPath$Protocol */ => {
let var_973 =
Some(
Result::<crate::model::Protocol, smithy_xml::decode::XmlError>::Ok(
crate::model::Protocol::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_protocol(var_973);
}
,
s if s.matches("destinationPort") /* DestinationPort com.amazonaws.ec2#NetworkInsightsPath$DestinationPort */ => {
let var_974 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_destination_port(var_974);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#NetworkInsightsPath$Tags */ => {
let var_975 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_975);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_interface(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterface, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterface::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#NetworkInterface$Association */ => {
let var_976 =
Some(
crate::xml_deser::deser_structure_network_interface_association(&mut tag)
?
)
;
builder = builder.set_association(var_976);
}
,
s if s.matches("attachment") /* Attachment com.amazonaws.ec2#NetworkInterface$Attachment */ => {
let var_977 =
Some(
crate::xml_deser::deser_structure_network_interface_attachment(&mut tag)
?
)
;
builder = builder.set_attachment(var_977);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#NetworkInterface$AvailabilityZone */ => {
let var_978 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_978);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#NetworkInterface$Description */ => {
let var_979 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_979);
}
,
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#NetworkInterface$Groups */ => {
let var_980 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_980);
}
,
s if s.matches("interfaceType") /* InterfaceType com.amazonaws.ec2#NetworkInterface$InterfaceType */ => {
let var_981 =
Some(
Result::<crate::model::NetworkInterfaceType, smithy_xml::decode::XmlError>::Ok(
crate::model::NetworkInterfaceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_interface_type(var_981);
}
,
s if s.matches("ipv6AddressesSet") /* Ipv6Addresses com.amazonaws.ec2#NetworkInterface$Ipv6Addresses */ => {
let var_982 =
Some(
crate::xml_deser::deser_list_network_interface_ipv6_addresses_list(&mut tag)
?
)
;
builder = builder.set_ipv6_addresses(var_982);
}
,
s if s.matches("macAddress") /* MacAddress com.amazonaws.ec2#NetworkInterface$MacAddress */ => {
let var_983 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_mac_address(var_983);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#NetworkInterface$NetworkInterfaceId */ => {
let var_984 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_984);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#NetworkInterface$OutpostArn */ => {
let var_985 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_985);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#NetworkInterface$OwnerId */ => {
let var_986 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_986);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#NetworkInterface$PrivateDnsName */ => {
let var_987 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_987);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#NetworkInterface$PrivateIpAddress */ => {
let var_988 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_988);
}
,
s if s.matches("privateIpAddressesSet") /* PrivateIpAddresses com.amazonaws.ec2#NetworkInterface$PrivateIpAddresses */ => {
let var_989 =
Some(
crate::xml_deser::deser_list_network_interface_private_ip_address_list(&mut tag)
?
)
;
builder = builder.set_private_ip_addresses(var_989);
}
,
s if s.matches("ipv4PrefixSet") /* Ipv4Prefixes com.amazonaws.ec2#NetworkInterface$Ipv4Prefixes */ => {
let var_990 =
Some(
crate::xml_deser::deser_list_ipv4_prefixes_list(&mut tag)
?
)
;
builder = builder.set_ipv4_prefixes(var_990);
}
,
s if s.matches("ipv6PrefixSet") /* Ipv6Prefixes com.amazonaws.ec2#NetworkInterface$Ipv6Prefixes */ => {
let var_991 =
Some(
crate::xml_deser::deser_list_ipv6_prefixes_list(&mut tag)
?
)
;
builder = builder.set_ipv6_prefixes(var_991);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#NetworkInterface$RequesterId */ => {
let var_992 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_requester_id(var_992);
}
,
s if s.matches("requesterManaged") /* RequesterManaged com.amazonaws.ec2#NetworkInterface$RequesterManaged */ => {
let var_993 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_requester_managed(var_993);
}
,
s if s.matches("sourceDestCheck") /* SourceDestCheck com.amazonaws.ec2#NetworkInterface$SourceDestCheck */ => {
let var_994 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_source_dest_check(var_994);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#NetworkInterface$Status */ => {
let var_995 =
Some(
Result::<crate::model::NetworkInterfaceStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::NetworkInterfaceStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_995);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#NetworkInterface$SubnetId */ => {
let var_996 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_996);
}
,
s if s.matches("tagSet") /* TagSet com.amazonaws.ec2#NetworkInterface$TagSet */ => {
let var_997 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tag_set(var_997);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#NetworkInterface$VpcId */ => {
let var_998 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_998);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_interface_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfacePermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfacePermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInterfacePermissionId") /* NetworkInterfacePermissionId com.amazonaws.ec2#NetworkInterfacePermission$NetworkInterfacePermissionId */ => {
let var_999 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_permission_id(var_999);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#NetworkInterfacePermission$NetworkInterfaceId */ => {
let var_1000 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_1000);
}
,
s if s.matches("awsAccountId") /* AwsAccountId com.amazonaws.ec2#NetworkInterfacePermission$AwsAccountId */ => {
let var_1001 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_account_id(var_1001);
}
,
s if s.matches("awsService") /* AwsService com.amazonaws.ec2#NetworkInterfacePermission$AwsService */ => {
let var_1002 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_service(var_1002);
}
,
s if s.matches("permission") /* Permission com.amazonaws.ec2#NetworkInterfacePermission$Permission */ => {
let var_1003 =
Some(
Result::<crate::model::InterfacePermissionType, smithy_xml::decode::XmlError>::Ok(
crate::model::InterfacePermissionType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_permission(var_1003);
}
,
s if s.matches("permissionState") /* PermissionState com.amazonaws.ec2#NetworkInterfacePermission$PermissionState */ => {
let var_1004 =
Some(
crate::xml_deser::deser_structure_network_interface_permission_state(&mut tag)
?
)
;
builder = builder.set_permission_state(var_1004);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_placement_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PlacementGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PlacementGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#PlacementGroup$GroupName */ => {
let var_1005 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_1005);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#PlacementGroup$State */ => {
let var_1006 =
Some(
Result::<crate::model::PlacementGroupState, smithy_xml::decode::XmlError>::Ok(
crate::model::PlacementGroupState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1006);
}
,
s if s.matches("strategy") /* Strategy com.amazonaws.ec2#PlacementGroup$Strategy */ => {
let var_1007 =
Some(
Result::<crate::model::PlacementStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::PlacementStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_strategy(var_1007);
}
,
s if s.matches("partitionCount") /* PartitionCount com.amazonaws.ec2#PlacementGroup$PartitionCount */ => {
let var_1008 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_partition_count(var_1008);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#PlacementGroup$GroupId */ => {
let var_1009 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#PlacementGroup$Tags */ => {
let var_1010 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1010);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_replace_root_volume_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReplaceRootVolumeTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReplaceRootVolumeTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("replaceRootVolumeTaskId") /* ReplaceRootVolumeTaskId com.amazonaws.ec2#ReplaceRootVolumeTask$ReplaceRootVolumeTaskId */ => {
let var_1011 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_replace_root_volume_task_id(var_1011);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ReplaceRootVolumeTask$InstanceId */ => {
let var_1012 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1012);
}
,
s if s.matches("taskState") /* TaskState com.amazonaws.ec2#ReplaceRootVolumeTask$TaskState */ => {
let var_1013 =
Some(
Result::<crate::model::ReplaceRootVolumeTaskState, smithy_xml::decode::XmlError>::Ok(
crate::model::ReplaceRootVolumeTaskState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_task_state(var_1013);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#ReplaceRootVolumeTask$StartTime */ => {
let var_1014 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_start_time(var_1014);
}
,
s if s.matches("completeTime") /* CompleteTime com.amazonaws.ec2#ReplaceRootVolumeTask$CompleteTime */ => {
let var_1015 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_complete_time(var_1015);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ReplaceRootVolumeTask$Tags */ => {
let var_1016 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1016);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_route_table(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RouteTable, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::RouteTable::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationSet") /* Associations com.amazonaws.ec2#RouteTable$Associations */ => {
let var_1017 =
Some(
crate::xml_deser::deser_list_route_table_association_list(&mut tag)
?
)
;
builder = builder.set_associations(var_1017);
}
,
s if s.matches("propagatingVgwSet") /* PropagatingVgws com.amazonaws.ec2#RouteTable$PropagatingVgws */ => {
let var_1018 =
Some(
crate::xml_deser::deser_list_propagating_vgw_list(&mut tag)
?
)
;
builder = builder.set_propagating_vgws(var_1018);
}
,
s if s.matches("routeTableId") /* RouteTableId com.amazonaws.ec2#RouteTable$RouteTableId */ => {
let var_1019 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_route_table_id(var_1019);
}
,
s if s.matches("routeSet") /* Routes com.amazonaws.ec2#RouteTable$Routes */ => {
let var_1020 =
Some(
crate::xml_deser::deser_list_route_list(&mut tag)
?
)
;
builder = builder.set_routes(var_1020);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#RouteTable$Tags */ => {
let var_1021 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1021);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#RouteTable$VpcId */ => {
let var_1022 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1022);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#RouteTable$OwnerId */ => {
let var_1023 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1023);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_snapshot_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SnapshotInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SnapshotSet$member */ => {
out.push(
crate::xml_deser::deser_structure_snapshot_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_spot_datafeed_subscription(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotDatafeedSubscription, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotDatafeedSubscription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#SpotDatafeedSubscription$Bucket */ => {
let var_1024 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_1024);
}
,
s if s.matches("fault") /* Fault com.amazonaws.ec2#SpotDatafeedSubscription$Fault */ => {
let var_1025 =
Some(
crate::xml_deser::deser_structure_spot_instance_state_fault(&mut tag)
?
)
;
builder = builder.set_fault(var_1025);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#SpotDatafeedSubscription$OwnerId */ => {
let var_1026 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1026);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#SpotDatafeedSubscription$Prefix */ => {
let var_1027 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_1027);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#SpotDatafeedSubscription$State */ => {
let var_1028 =
Some(
Result::<crate::model::DatafeedSubscriptionState, smithy_xml::decode::XmlError>::Ok(
crate::model::DatafeedSubscriptionState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1028);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_subnet_cidr_reservation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SubnetCidrReservation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SubnetCidrReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnetCidrReservationId") /* SubnetCidrReservationId com.amazonaws.ec2#SubnetCidrReservation$SubnetCidrReservationId */ => {
let var_1029 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_cidr_reservation_id(var_1029);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#SubnetCidrReservation$SubnetId */ => {
let var_1030 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_1030);
}
,
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#SubnetCidrReservation$Cidr */ => {
let var_1031 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_1031);
}
,
s if s.matches("reservationType") /* ReservationType com.amazonaws.ec2#SubnetCidrReservation$ReservationType */ => {
let var_1032 =
Some(
Result::<crate::model::SubnetCidrReservationType, smithy_xml::decode::XmlError>::Ok(
crate::model::SubnetCidrReservationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_reservation_type(var_1032);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#SubnetCidrReservation$OwnerId */ => {
let var_1033 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1033);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SubnetCidrReservation$Description */ => {
let var_1034 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1034);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SubnetCidrReservation$Tags */ => {
let var_1035 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1035);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_traffic_mirror_filter(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorFilter, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorFilter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#TrafficMirrorFilter$TrafficMirrorFilterId */ => {
let var_1036 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_id(var_1036);
}
,
s if s.matches("ingressFilterRuleSet") /* IngressFilterRules com.amazonaws.ec2#TrafficMirrorFilter$IngressFilterRules */ => {
let var_1037 =
Some(
crate::xml_deser::deser_list_traffic_mirror_filter_rule_list(&mut tag)
?
)
;
builder = builder.set_ingress_filter_rules(var_1037);
}
,
s if s.matches("egressFilterRuleSet") /* EgressFilterRules com.amazonaws.ec2#TrafficMirrorFilter$EgressFilterRules */ => {
let var_1038 =
Some(
crate::xml_deser::deser_list_traffic_mirror_filter_rule_list(&mut tag)
?
)
;
builder = builder.set_egress_filter_rules(var_1038);
}
,
s if s.matches("networkServiceSet") /* NetworkServices com.amazonaws.ec2#TrafficMirrorFilter$NetworkServices */ => {
let var_1039 =
Some(
crate::xml_deser::deser_list_traffic_mirror_network_service_list(&mut tag)
?
)
;
builder = builder.set_network_services(var_1039);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorFilter$Description */ => {
let var_1040 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1040);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TrafficMirrorFilter$Tags */ => {
let var_1041 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1041);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_traffic_mirror_filter_rule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorFilterRule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorFilterRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorFilterRuleId") /* TrafficMirrorFilterRuleId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterRuleId */ => {
let var_1042 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_rule_id(var_1042);
}
,
s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficMirrorFilterId */ => {
let var_1043 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_id(var_1043);
}
,
s if s.matches("trafficDirection") /* TrafficDirection com.amazonaws.ec2#TrafficMirrorFilterRule$TrafficDirection */ => {
let var_1044 =
Some(
Result::<crate::model::TrafficDirection, smithy_xml::decode::XmlError>::Ok(
crate::model::TrafficDirection::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_traffic_direction(var_1044);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#TrafficMirrorFilterRule$RuleNumber */ => {
let var_1045 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rule_number(var_1045);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#TrafficMirrorFilterRule$RuleAction */ => {
let var_1046 =
Some(
Result::<crate::model::TrafficMirrorRuleAction, smithy_xml::decode::XmlError>::Ok(
crate::model::TrafficMirrorRuleAction::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_rule_action(var_1046);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TrafficMirrorFilterRule$Protocol */ => {
let var_1047 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_protocol(var_1047);
}
,
s if s.matches("destinationPortRange") /* DestinationPortRange com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationPortRange */ => {
let var_1048 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_port_range(&mut tag)
?
)
;
builder = builder.set_destination_port_range(var_1048);
}
,
s if s.matches("sourcePortRange") /* SourcePortRange com.amazonaws.ec2#TrafficMirrorFilterRule$SourcePortRange */ => {
let var_1049 =
Some(
crate::xml_deser::deser_structure_traffic_mirror_port_range(&mut tag)
?
)
;
builder = builder.set_source_port_range(var_1049);
}
,
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$DestinationCidrBlock */ => {
let var_1050 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr_block(var_1050);
}
,
s if s.matches("sourceCidrBlock") /* SourceCidrBlock com.amazonaws.ec2#TrafficMirrorFilterRule$SourceCidrBlock */ => {
let var_1051 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source_cidr_block(var_1051);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorFilterRule$Description */ => {
let var_1052 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1052);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_traffic_mirror_session(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorSession, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorSession::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorSessionId") /* TrafficMirrorSessionId com.amazonaws.ec2#TrafficMirrorSession$TrafficMirrorSessionId */ => {
let var_1053 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_session_id(var_1053);
}
,
s if s.matches("trafficMirrorTargetId") /* TrafficMirrorTargetId com.amazonaws.ec2#TrafficMirrorSession$TrafficMirrorTargetId */ => {
let var_1054 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_target_id(var_1054);
}
,
s if s.matches("trafficMirrorFilterId") /* TrafficMirrorFilterId com.amazonaws.ec2#TrafficMirrorSession$TrafficMirrorFilterId */ => {
let var_1055 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_filter_id(var_1055);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#TrafficMirrorSession$NetworkInterfaceId */ => {
let var_1056 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_1056);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#TrafficMirrorSession$OwnerId */ => {
let var_1057 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1057);
}
,
s if s.matches("packetLength") /* PacketLength com.amazonaws.ec2#TrafficMirrorSession$PacketLength */ => {
let var_1058 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_packet_length(var_1058);
}
,
s if s.matches("sessionNumber") /* SessionNumber com.amazonaws.ec2#TrafficMirrorSession$SessionNumber */ => {
let var_1059 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_session_number(var_1059);
}
,
s if s.matches("virtualNetworkId") /* VirtualNetworkId com.amazonaws.ec2#TrafficMirrorSession$VirtualNetworkId */ => {
let var_1060 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_virtual_network_id(var_1060);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorSession$Description */ => {
let var_1061 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1061);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TrafficMirrorSession$Tags */ => {
let var_1062 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1062);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_traffic_mirror_target(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorTarget, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorTarget::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("trafficMirrorTargetId") /* TrafficMirrorTargetId com.amazonaws.ec2#TrafficMirrorTarget$TrafficMirrorTargetId */ => {
let var_1063 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_traffic_mirror_target_id(var_1063);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#TrafficMirrorTarget$NetworkInterfaceId */ => {
let var_1064 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_1064);
}
,
s if s.matches("networkLoadBalancerArn") /* NetworkLoadBalancerArn com.amazonaws.ec2#TrafficMirrorTarget$NetworkLoadBalancerArn */ => {
let var_1065 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_load_balancer_arn(var_1065);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#TrafficMirrorTarget$Type */ => {
let var_1066 =
Some(
Result::<crate::model::TrafficMirrorTargetType, smithy_xml::decode::XmlError>::Ok(
crate::model::TrafficMirrorTargetType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1066);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TrafficMirrorTarget$Description */ => {
let var_1067 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1067);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#TrafficMirrorTarget$OwnerId */ => {
let var_1068 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1068);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TrafficMirrorTarget$Tags */ => {
let var_1069 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1069);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGateway$TransitGatewayId */ => {
let var_1070 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1070);
}
,
s if s.matches("transitGatewayArn") /* TransitGatewayArn com.amazonaws.ec2#TransitGateway$TransitGatewayArn */ => {
let var_1071 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_arn(var_1071);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGateway$State */ => {
let var_1072 =
Some(
Result::<crate::model::TransitGatewayState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#TransitGateway$OwnerId */ => {
let var_1073 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1073);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#TransitGateway$Description */ => {
let var_1074 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1074);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGateway$CreationTime */ => {
let var_1075 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1075);
}
,
s if s.matches("options") /* Options com.amazonaws.ec2#TransitGateway$Options */ => {
let var_1076 =
Some(
crate::xml_deser::deser_structure_transit_gateway_options(&mut tag)
?
)
;
builder = builder.set_options(var_1076);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGateway$Tags */ => {
let var_1077 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1077);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_connect(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayConnect, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayConnect::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayConnect$TransitGatewayAttachmentId */ => {
let var_1078 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_1078);
}
,
s if s.matches("transportTransitGatewayAttachmentId") /* TransportTransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayConnect$TransportTransitGatewayAttachmentId */ => {
let var_1079 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transport_transit_gateway_attachment_id(var_1079);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayConnect$TransitGatewayId */ => {
let var_1080 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1080);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayConnect$State */ => {
let var_1081 =
Some(
Result::<crate::model::TransitGatewayAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1081);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayConnect$CreationTime */ => {
let var_1082 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1082);
}
,
s if s.matches("options") /* Options com.amazonaws.ec2#TransitGatewayConnect$Options */ => {
let var_1083 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect_options(&mut tag)
?
)
;
builder = builder.set_options(var_1083);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayConnect$Tags */ => {
let var_1084 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1084);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_connect_peer(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayConnectPeer, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayConnectPeer::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayConnectPeer$TransitGatewayAttachmentId */ => {
let var_1085 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_1085);
}
,
s if s.matches("transitGatewayConnectPeerId") /* TransitGatewayConnectPeerId com.amazonaws.ec2#TransitGatewayConnectPeer$TransitGatewayConnectPeerId */ => {
let var_1086 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_connect_peer_id(var_1086);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayConnectPeer$State */ => {
let var_1087 =
Some(
Result::<crate::model::TransitGatewayConnectPeerState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayConnectPeerState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1087);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayConnectPeer$CreationTime */ => {
let var_1088 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1088);
}
,
s if s.matches("connectPeerConfiguration") /* ConnectPeerConfiguration com.amazonaws.ec2#TransitGatewayConnectPeer$ConnectPeerConfiguration */ => {
let var_1089 =
Some(
crate::xml_deser::deser_structure_transit_gateway_connect_peer_configuration(&mut tag)
?
)
;
builder = builder.set_connect_peer_configuration(var_1089);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayConnectPeer$Tags */ => {
let var_1090 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1090);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_domain(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastDomain, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDomain::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastDomain$TransitGatewayMulticastDomainId */ => {
let var_1091 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_1091);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayMulticastDomain$TransitGatewayId */ => {
let var_1092 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1092);
}
,
s if s.matches("transitGatewayMulticastDomainArn") /* TransitGatewayMulticastDomainArn com.amazonaws.ec2#TransitGatewayMulticastDomain$TransitGatewayMulticastDomainArn */ => {
let var_1093 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_arn(var_1093);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#TransitGatewayMulticastDomain$OwnerId */ => {
let var_1094 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1094);
}
,
s if s.matches("options") /* Options com.amazonaws.ec2#TransitGatewayMulticastDomain$Options */ => {
let var_1095 =
Some(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_options(&mut tag)
?
)
;
builder = builder.set_options(var_1095);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayMulticastDomain$State */ => {
let var_1096 =
Some(
Result::<crate::model::TransitGatewayMulticastDomainState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayMulticastDomainState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1096);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayMulticastDomain$CreationTime */ => {
let var_1097 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1097);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayMulticastDomain$Tags */ => {
let var_1098 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1098);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_prefix_list_reference(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayPrefixListReference, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayPrefixListReference::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayPrefixListReference$TransitGatewayRouteTableId */ => {
let var_1099 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_1099);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#TransitGatewayPrefixListReference$PrefixListId */ => {
let var_1100 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_1100);
}
,
s if s.matches("prefixListOwnerId") /* PrefixListOwnerId com.amazonaws.ec2#TransitGatewayPrefixListReference$PrefixListOwnerId */ => {
let var_1101 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_owner_id(var_1101);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayPrefixListReference$State */ => {
let var_1102 =
Some(
Result::<crate::model::TransitGatewayPrefixListReferenceState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayPrefixListReferenceState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1102);
}
,
s if s.matches("blackhole") /* Blackhole com.amazonaws.ec2#TransitGatewayPrefixListReference$Blackhole */ => {
let var_1103 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_blackhole(var_1103);
}
,
s if s.matches("transitGatewayAttachment") /* TransitGatewayAttachment com.amazonaws.ec2#TransitGatewayPrefixListReference$TransitGatewayAttachment */ => {
let var_1104 =
Some(
crate::xml_deser::deser_structure_transit_gateway_prefix_list_attachment(&mut tag)
?
)
;
builder = builder.set_transit_gateway_attachment(var_1104);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayRoute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayRoute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#TransitGatewayRoute$DestinationCidrBlock */ => {
let var_1105 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr_block(var_1105);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#TransitGatewayRoute$PrefixListId */ => {
let var_1106 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_1106);
}
,
s if s.matches("transitGatewayAttachments") /* TransitGatewayAttachments com.amazonaws.ec2#TransitGatewayRoute$TransitGatewayAttachments */ => {
let var_1107 =
Some(
crate::xml_deser::deser_list_transit_gateway_route_attachment_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_attachments(var_1107);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#TransitGatewayRoute$Type */ => {
let var_1108 =
Some(
Result::<crate::model::TransitGatewayRouteType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayRouteType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1108);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayRoute$State */ => {
let var_1109 =
Some(
Result::<crate::model::TransitGatewayRouteState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayRouteState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1109);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_route_table(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayRouteTable, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayRouteTable::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayRouteTable$TransitGatewayRouteTableId */ => {
let var_1110 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_1110);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayRouteTable$TransitGatewayId */ => {
let var_1111 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1111);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayRouteTable$State */ => {
let var_1112 =
Some(
Result::<crate::model::TransitGatewayRouteTableState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayRouteTableState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1112);
}
,
s if s.matches("defaultAssociationRouteTable") /* DefaultAssociationRouteTable com.amazonaws.ec2#TransitGatewayRouteTable$DefaultAssociationRouteTable */ => {
let var_1113 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_default_association_route_table(var_1113);
}
,
s if s.matches("defaultPropagationRouteTable") /* DefaultPropagationRouteTable com.amazonaws.ec2#TransitGatewayRouteTable$DefaultPropagationRouteTable */ => {
let var_1114 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_default_propagation_route_table(var_1114);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayRouteTable$CreationTime */ => {
let var_1115 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1115);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayRouteTable$Tags */ => {
let var_1116 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1116);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_volume_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeAttachment>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_vpc_endpoint(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcEndpoint, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcEndpoint::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("vpcEndpointId") /* VpcEndpointId com.amazonaws.ec2#VpcEndpoint$VpcEndpointId */ => {
let var_1117 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_endpoint_id(var_1117);
}
,
s if s.matches("vpcEndpointType") /* VpcEndpointType com.amazonaws.ec2#VpcEndpoint$VpcEndpointType */ => {
let var_1118 =
Some(
Result::<crate::model::VpcEndpointType, smithy_xml::decode::XmlError>::Ok(
crate::model::VpcEndpointType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_vpc_endpoint_type(var_1118);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#VpcEndpoint$VpcId */ => {
let var_1119 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1119);
}
,
s if s.matches("serviceName") /* ServiceName com.amazonaws.ec2#VpcEndpoint$ServiceName */ => {
let var_1120 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_name(var_1120);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpcEndpoint$State */ => {
let var_1121 =
Some(
Result::<crate::model::State, smithy_xml::decode::XmlError>::Ok(
crate::model::State::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1121);
}
,
s if s.matches("policyDocument") /* PolicyDocument com.amazonaws.ec2#VpcEndpoint$PolicyDocument */ => {
let var_1122 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_policy_document(var_1122);
}
,
s if s.matches("routeTableIdSet") /* RouteTableIds com.amazonaws.ec2#VpcEndpoint$RouteTableIds */ => {
let var_1123 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_route_table_ids(var_1123);
}
,
s if s.matches("subnetIdSet") /* SubnetIds com.amazonaws.ec2#VpcEndpoint$SubnetIds */ => {
let var_1124 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_subnet_ids(var_1124);
}
,
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#VpcEndpoint$Groups */ => {
let var_1125 =
Some(
crate::xml_deser::deser_list_group_identifier_set(&mut tag)
?
)
;
builder = builder.set_groups(var_1125);
}
,
s if s.matches("privateDnsEnabled") /* PrivateDnsEnabled com.amazonaws.ec2#VpcEndpoint$PrivateDnsEnabled */ => {
let var_1126 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_private_dns_enabled(var_1126);
}
,
s if s.matches("requesterManaged") /* RequesterManaged com.amazonaws.ec2#VpcEndpoint$RequesterManaged */ => {
let var_1127 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_requester_managed(var_1127);
}
,
s if s.matches("networkInterfaceIdSet") /* NetworkInterfaceIds com.amazonaws.ec2#VpcEndpoint$NetworkInterfaceIds */ => {
let var_1128 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_network_interface_ids(var_1128);
}
,
s if s.matches("dnsEntrySet") /* DnsEntries com.amazonaws.ec2#VpcEndpoint$DnsEntries */ => {
let var_1129 =
Some(
crate::xml_deser::deser_list_dns_entry_set(&mut tag)
?
)
;
builder = builder.set_dns_entries(var_1129);
}
,
s if s.matches("creationTimestamp") /* CreationTimestamp com.amazonaws.ec2#VpcEndpoint$CreationTimestamp */ => {
let var_1130 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_creation_timestamp(var_1130);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpcEndpoint$Tags */ => {
let var_1131 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1131);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#VpcEndpoint$OwnerId */ => {
let var_1132 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1132);
}
,
s if s.matches("lastError") /* LastError com.amazonaws.ec2#VpcEndpoint$LastError */ => {
let var_1133 =
Some(
crate::xml_deser::deser_structure_last_error(&mut tag)
?
)
;
builder = builder.set_last_error(var_1133);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_connection_notification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ConnectionNotification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ConnectionNotification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("connectionNotificationId") /* ConnectionNotificationId com.amazonaws.ec2#ConnectionNotification$ConnectionNotificationId */ => {
let var_1134 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_notification_id(var_1134);
}
,
s if s.matches("serviceId") /* ServiceId com.amazonaws.ec2#ConnectionNotification$ServiceId */ => {
let var_1135 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_id(var_1135);
}
,
s if s.matches("vpcEndpointId") /* VpcEndpointId com.amazonaws.ec2#ConnectionNotification$VpcEndpointId */ => {
let var_1136 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_endpoint_id(var_1136);
}
,
s if s.matches("connectionNotificationType") /* ConnectionNotificationType com.amazonaws.ec2#ConnectionNotification$ConnectionNotificationType */ => {
let var_1137 =
Some(
Result::<crate::model::ConnectionNotificationType, smithy_xml::decode::XmlError>::Ok(
crate::model::ConnectionNotificationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_connection_notification_type(var_1137);
}
,
s if s.matches("connectionNotificationArn") /* ConnectionNotificationArn com.amazonaws.ec2#ConnectionNotification$ConnectionNotificationArn */ => {
let var_1138 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_notification_arn(var_1138);
}
,
s if s.matches("connectionEvents") /* ConnectionEvents com.amazonaws.ec2#ConnectionNotification$ConnectionEvents */ => {
let var_1139 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_connection_events(var_1139);
}
,
s if s.matches("connectionNotificationState") /* ConnectionNotificationState com.amazonaws.ec2#ConnectionNotification$ConnectionNotificationState */ => {
let var_1140 =
Some(
Result::<crate::model::ConnectionNotificationState, smithy_xml::decode::XmlError>::Ok(
crate::model::ConnectionNotificationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_connection_notification_state(var_1140);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_service_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServiceConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ServiceConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceType") /* ServiceType com.amazonaws.ec2#ServiceConfiguration$ServiceType */ => {
let var_1141 =
Some(
crate::xml_deser::deser_list_service_type_detail_set(&mut tag)
?
)
;
builder = builder.set_service_type(var_1141);
}
,
s if s.matches("serviceId") /* ServiceId com.amazonaws.ec2#ServiceConfiguration$ServiceId */ => {
let var_1142 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_id(var_1142);
}
,
s if s.matches("serviceName") /* ServiceName com.amazonaws.ec2#ServiceConfiguration$ServiceName */ => {
let var_1143 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_name(var_1143);
}
,
s if s.matches("serviceState") /* ServiceState com.amazonaws.ec2#ServiceConfiguration$ServiceState */ => {
let var_1144 =
Some(
Result::<crate::model::ServiceState, smithy_xml::decode::XmlError>::Ok(
crate::model::ServiceState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_service_state(var_1144);
}
,
s if s.matches("availabilityZoneSet") /* AvailabilityZones com.amazonaws.ec2#ServiceConfiguration$AvailabilityZones */ => {
let var_1145 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_1145);
}
,
s if s.matches("acceptanceRequired") /* AcceptanceRequired com.amazonaws.ec2#ServiceConfiguration$AcceptanceRequired */ => {
let var_1146 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_acceptance_required(var_1146);
}
,
s if s.matches("managesVpcEndpoints") /* ManagesVpcEndpoints com.amazonaws.ec2#ServiceConfiguration$ManagesVpcEndpoints */ => {
let var_1147 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_manages_vpc_endpoints(var_1147);
}
,
s if s.matches("networkLoadBalancerArnSet") /* NetworkLoadBalancerArns com.amazonaws.ec2#ServiceConfiguration$NetworkLoadBalancerArns */ => {
let var_1148 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_network_load_balancer_arns(var_1148);
}
,
s if s.matches("gatewayLoadBalancerArnSet") /* GatewayLoadBalancerArns com.amazonaws.ec2#ServiceConfiguration$GatewayLoadBalancerArns */ => {
let var_1149 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_gateway_load_balancer_arns(var_1149);
}
,
s if s.matches("baseEndpointDnsNameSet") /* BaseEndpointDnsNames com.amazonaws.ec2#ServiceConfiguration$BaseEndpointDnsNames */ => {
let var_1150 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_base_endpoint_dns_names(var_1150);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#ServiceConfiguration$PrivateDnsName */ => {
let var_1151 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_1151);
}
,
s if s.matches("privateDnsNameConfiguration") /* PrivateDnsNameConfiguration com.amazonaws.ec2#ServiceConfiguration$PrivateDnsNameConfiguration */ => {
let var_1152 =
Some(
crate::xml_deser::deser_structure_private_dns_name_configuration(&mut tag)
?
)
;
builder = builder.set_private_dns_name_configuration(var_1152);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ServiceConfiguration$Tags */ => {
let var_1153 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1153);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpn_connection(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnConnection, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnConnection::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("customerGatewayConfiguration") /* CustomerGatewayConfiguration com.amazonaws.ec2#VpnConnection$CustomerGatewayConfiguration */ => {
let var_1154 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_gateway_configuration(var_1154);
}
,
s if s.matches("customerGatewayId") /* CustomerGatewayId com.amazonaws.ec2#VpnConnection$CustomerGatewayId */ => {
let var_1155 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_gateway_id(var_1155);
}
,
s if s.matches("category") /* Category com.amazonaws.ec2#VpnConnection$Category */ => {
let var_1156 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_category(var_1156);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnConnection$State */ => {
let var_1157 =
Some(
Result::<crate::model::VpnState, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1157);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnConnection$Type */ => {
let var_1158 =
Some(
Result::<crate::model::GatewayType, smithy_xml::decode::XmlError>::Ok(
crate::model::GatewayType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1158);
}
,
s if s.matches("vpnConnectionId") /* VpnConnectionId com.amazonaws.ec2#VpnConnection$VpnConnectionId */ => {
let var_1159 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpn_connection_id(var_1159);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnConnection$VpnGatewayId */ => {
let var_1160 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpn_gateway_id(var_1160);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#VpnConnection$TransitGatewayId */ => {
let var_1161 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1161);
}
,
s if s.matches("options") /* Options com.amazonaws.ec2#VpnConnection$Options */ => {
let var_1162 =
Some(
crate::xml_deser::deser_structure_vpn_connection_options(&mut tag)
?
)
;
builder = builder.set_options(var_1162);
}
,
s if s.matches("routes") /* Routes com.amazonaws.ec2#VpnConnection$Routes */ => {
let var_1163 =
Some(
crate::xml_deser::deser_list_vpn_static_route_list(&mut tag)
?
)
;
builder = builder.set_routes(var_1163);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnConnection$Tags */ => {
let var_1164 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1164);
}
,
s if s.matches("vgwTelemetry") /* VgwTelemetry com.amazonaws.ec2#VpnConnection$VgwTelemetry */ => {
let var_1165 =
Some(
crate::xml_deser::deser_list_vgw_telemetry_list(&mut tag)
?
)
;
builder = builder.set_vgw_telemetry(var_1165);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpn_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VpnGateway$AvailabilityZone */ => {
let var_1166 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1166);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnGateway$State */ => {
let var_1167 =
Some(
Result::<crate::model::VpnState, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1167);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#VpnGateway$Type */ => {
let var_1168 =
Some(
Result::<crate::model::GatewayType, smithy_xml::decode::XmlError>::Ok(
crate::model::GatewayType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1168);
}
,
s if s.matches("attachments") /* VpcAttachments com.amazonaws.ec2#VpnGateway$VpcAttachments */ => {
let var_1169 =
Some(
crate::xml_deser::deser_list_vpc_attachment_list(&mut tag)
?
)
;
builder = builder.set_vpc_attachments(var_1169);
}
,
s if s.matches("vpnGatewayId") /* VpnGatewayId com.amazonaws.ec2#VpnGateway$VpnGatewayId */ => {
let var_1170 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpn_gateway_id(var_1170);
}
,
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#VpnGateway$AmazonSideAsn */ => {
let var_1171 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_amazon_side_asn(var_1171);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpnGateway$Tags */ => {
let var_1172 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1172);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_delete_fleet_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DeleteFleetSuccessItem>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DeleteFleetSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_delete_fleet_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_delete_fleet_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DeleteFleetErrorItem>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DeleteFleetErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_delete_fleet_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_event_window_state_change(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceEventWindowStateChange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceEventWindowStateChange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventWindowId") /* InstanceEventWindowId com.amazonaws.ec2#InstanceEventWindowStateChange$InstanceEventWindowId */ => {
let var_1173 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_event_window_id(var_1173);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#InstanceEventWindowStateChange$State */ => {
let var_1174 =
Some(
Result::<crate::model::InstanceEventWindowState, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceEventWindowState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1174);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_delete_launch_template_versions_response_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_delete_launch_template_versions_response_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_delete_launch_template_versions_response_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DeleteLaunchTemplateVersionsResponseErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_delete_launch_template_versions_response_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_successful_queued_purchase_deletion_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::SuccessfulQueuedPurchaseDeletion>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SuccessfulQueuedPurchaseDeletionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_successful_queued_purchase_deletion(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_failed_queued_purchase_deletion_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FailedQueuedPurchaseDeletion>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FailedQueuedPurchaseDeletionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_failed_queued_purchase_deletion(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_tag_notification_attribute(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceTagNotificationAttribute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceTagNotificationAttribute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceTagKeySet") /* InstanceTagKeys com.amazonaws.ec2#InstanceTagNotificationAttribute$InstanceTagKeys */ => {
let var_1175 =
Some(
crate::xml_deser::deser_list_instance_tag_key_set(&mut tag)
?
)
;
builder = builder.set_instance_tag_keys(var_1175);
}
,
s if s.matches("includeAllTagsOfInstance") /* IncludeAllTagsOfInstance com.amazonaws.ec2#InstanceTagNotificationAttribute$IncludeAllTagsOfInstance */ => {
let var_1176 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_include_all_tags_of_instance(var_1176);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_deregistered_group_members(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::TransitGatewayMulticastDeregisteredGroupMembers,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDeregisteredGroupMembers::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupMembers$TransitGatewayMulticastDomainId */ => {
let var_1177 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_1177);
}
,
s if s.matches("deregisteredNetworkInterfaceIds") /* DeregisteredNetworkInterfaceIds com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupMembers$DeregisteredNetworkInterfaceIds */ => {
let var_1178 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_deregistered_network_interface_ids(var_1178);
}
,
s if s.matches("groupIpAddress") /* GroupIpAddress com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupMembers$GroupIpAddress */ => {
let var_1179 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_ip_address(var_1179);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_deregistered_group_sources(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::TransitGatewayMulticastDeregisteredGroupSources,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDeregisteredGroupSources::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupSources$TransitGatewayMulticastDomainId */ => {
let var_1180 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_1180);
}
,
s if s.matches("deregisteredNetworkInterfaceIds") /* DeregisteredNetworkInterfaceIds com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupSources$DeregisteredNetworkInterfaceIds */ => {
let var_1181 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_deregistered_network_interface_ids(var_1181);
}
,
s if s.matches("groupIpAddress") /* GroupIpAddress com.amazonaws.ec2#TransitGatewayMulticastDeregisteredGroupSources$GroupIpAddress */ => {
let var_1182 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_ip_address(var_1182);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_account_attribute_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AccountAttribute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AccountAttributeList$member */ => {
out.push(
crate::xml_deser::deser_structure_account_attribute(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Address>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_address_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AddressAttribute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AddressSet$member */ => {
out.push(
crate::xml_deser::deser_structure_address_attribute(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_id_format_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::IdFormat>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IdFormatList$member */ => {
out.push(
crate::xml_deser::deser_structure_id_format(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_availability_zone_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AvailabilityZone>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AvailabilityZoneList$member */ => {
out.push(
crate::xml_deser::deser_structure_availability_zone(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_bundle_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::BundleTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#BundleTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_bundle_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_byoip_cidr_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ByoipCidr>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ByoipCidrSet$member */ => {
out.push(
crate::xml_deser::deser_structure_byoip_cidr(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_capacity_reservation_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CapacityReservation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CapacityReservationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_capacity_reservation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_carrier_gateway_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CarrierGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CarrierGatewaySet$member */ => {
out.push(
crate::xml_deser::deser_structure_carrier_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_classic_link_instance_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClassicLinkInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClassicLinkInstanceList$member */ => {
out.push(
crate::xml_deser::deser_structure_classic_link_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_authorization_rule_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AuthorizationRule>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AuthorizationRuleSet$member */ => {
out.push(
crate::xml_deser::deser_structure_authorization_rule(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_client_vpn_connection_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClientVpnConnection>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClientVpnConnectionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_client_vpn_connection(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_endpoint_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClientVpnEndpoint>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#EndpointSet$member */ => {
out.push(
crate::xml_deser::deser_structure_client_vpn_endpoint(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_client_vpn_route_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClientVpnRoute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClientVpnRouteSet$member */ => {
out.push(
crate::xml_deser::deser_structure_client_vpn_route(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_target_network_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TargetNetwork>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TargetNetworkSet$member */ => {
out.push(
crate::xml_deser::deser_structure_target_network(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_coip_pool_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CoipPool>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CoipPoolSet$member */ => {
out.push(
crate::xml_deser::deser_structure_coip_pool(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_describe_conversion_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ConversionTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DescribeConversionTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_conversion_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_customer_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CustomerGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CustomerGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_customer_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_dhcp_options_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DhcpOptions>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DhcpOptionsList$member */ => {
out.push(
crate::xml_deser::deser_structure_dhcp_options(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_egress_only_internet_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::EgressOnlyInternetGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#EgressOnlyInternetGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_egress_only_internet_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_elastic_gpu_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ElasticGpus>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ElasticGpuSet$member */ => {
out.push(
crate::xml_deser::deser_structure_elastic_gpus(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_export_image_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ExportImageTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ExportImageTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_export_image_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_export_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ExportTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ExportTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_export_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_describe_fast_snapshot_restore_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DescribeFastSnapshotRestoreSuccessItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_describe_fast_snapshot_restore_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_history_record_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::HistoryRecordEntry>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HistoryRecordSet$member */ => {
out.push(
crate::xml_deser::deser_structure_history_record_entry(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_active_instance_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ActiveInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ActiveInstanceSet$member */ => {
out.push(
crate::xml_deser::deser_structure_active_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_fleet_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FleetData>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FleetSet$member */ => {
out.push(
crate::xml_deser::deser_structure_fleet_data(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_flow_log_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FlowLog>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FlowLogSet$member */ => {
out.push(
crate::xml_deser::deser_structure_flow_log(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_fpga_image_attribute(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaImageAttribute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaImageAttribute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageId") /* FpgaImageId com.amazonaws.ec2#FpgaImageAttribute$FpgaImageId */ => {
let var_1183 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_id(var_1183);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#FpgaImageAttribute$Name */ => {
let var_1184 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_1184);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#FpgaImageAttribute$Description */ => {
let var_1185 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1185);
}
,
s if s.matches("loadPermissions") /* LoadPermissions com.amazonaws.ec2#FpgaImageAttribute$LoadPermissions */ => {
let var_1186 =
Some(
crate::xml_deser::deser_list_load_permission_list(&mut tag)
?
)
;
builder = builder.set_load_permissions(var_1186);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#FpgaImageAttribute$ProductCodes */ => {
let var_1187 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_1187);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_fpga_image_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FpgaImage>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FpgaImageList$member */ => {
out.push(
crate::xml_deser::deser_structure_fpga_image(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_host_offering_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::HostOffering>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HostOfferingSet$member */ => {
out.push(
crate::xml_deser::deser_structure_host_offering(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_host_reservation_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::HostReservation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HostReservationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_host_reservation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_host_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Host>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HostList$member */ => {
out.push(
crate::xml_deser::deser_structure_host(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_iam_instance_profile_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::IamInstanceProfileAssociation>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IamInstanceProfileAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_iam_instance_profile_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_block_device_mapping_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::BlockDeviceMapping>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#BlockDeviceMappingList$member */ => {
out.push(
crate::xml_deser::deser_structure_block_device_mapping(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_permission_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchPermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchPermissionList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_product_code_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ProductCode>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ProductCodeList$member */ => {
out.push(
crate::xml_deser::deser_structure_product_code(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_attribute_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AttributeValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AttributeValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#AttributeValue$Value */ => {
let var_1188 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1188);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_image_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Image>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ImageList$member */ => {
out.push(
crate::xml_deser::deser_structure_image(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_import_image_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ImportImageTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ImportImageTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_import_image_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_import_snapshot_task_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ImportSnapshotTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ImportSnapshotTaskList$member */ => {
out.push(
crate::xml_deser::deser_structure_import_snapshot_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_group_identifier_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::GroupIdentifier>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#GroupIdentifierList$member */ => {
out.push(
crate::xml_deser::deser_structure_group_identifier(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_block_device_mapping_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceBlockDeviceMappingList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_block_device_mapping(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_attribute_boolean_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AttributeBooleanValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AttributeBooleanValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#AttributeBooleanValue$Value */ => {
let var_1189 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_value(var_1189);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_enclave_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EnclaveOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EnclaveOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#EnclaveOptions$Enabled */ => {
let var_1190 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_1190);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_credit_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceCreditSpecification>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceCreditSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_credit_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_event_window_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceEventWindow>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceEventWindowSet$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_event_window(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reservation_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Reservation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservationList$member */ => {
out.push(
crate::xml_deser::deser_structure_reservation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_status_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceStatus>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceStatusList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_status(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_type_offerings_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceTypeOffering>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceTypeOfferingsList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_type_offering(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_type_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceTypeInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceTypeInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_type_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_internet_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InternetGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InternetGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_internet_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_pool_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6Pool>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6PoolSet$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_pool(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_key_pair_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::KeyPairInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#KeyPairList$member */ => {
out.push(
crate::xml_deser::deser_structure_key_pair_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchTemplate>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateSet$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_version_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchTemplateVersion>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateVersionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_version(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_route_table_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LocalGatewayRouteTable>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayRouteTableSet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_route_table(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_route_table_virtual_interface_group_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_route_table_virtual_interface_group_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_route_table_vpc_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LocalGatewayRouteTableVpcAssociation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayRouteTableVpcAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_route_table_vpc_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LocalGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewaySet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_virtual_interface_group_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LocalGatewayVirtualInterfaceGroup>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroupSet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_virtual_interface_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_virtual_interface_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LocalGatewayVirtualInterface>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayVirtualInterfaceSet$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_virtual_interface(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_managed_prefix_list_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ManagedPrefixList>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ManagedPrefixListSet$member */ => {
out.push(
crate::xml_deser::deser_structure_managed_prefix_list(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_moving_address_status_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::MovingAddressStatus>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#MovingAddressStatusSet$member */ => {
out.push(
crate::xml_deser::deser_structure_moving_address_status(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_nat_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NatGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NatGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_nat_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_acl_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkAcl>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkAclList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_acl(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_insights_analysis_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkInsightsAnalysis>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInsightsAnalysisList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_insights_analysis(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_insights_path_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkInsightsPath>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInsightsPathList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_insights_path(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_network_interface_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfaceAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfaceAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#NetworkInterfaceAttachment$AttachTime */ => {
let var_1191 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1191);
}
,
s if s.matches("attachmentId") /* AttachmentId com.amazonaws.ec2#NetworkInterfaceAttachment$AttachmentId */ => {
let var_1192 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_attachment_id(var_1192);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#NetworkInterfaceAttachment$DeleteOnTermination */ => {
let var_1193 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_1193);
}
,
s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#NetworkInterfaceAttachment$DeviceIndex */ => {
let var_1194 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_device_index(var_1194);
}
,
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#NetworkInterfaceAttachment$NetworkCardIndex */ => {
let var_1195 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_network_card_index(var_1195);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#NetworkInterfaceAttachment$InstanceId */ => {
let var_1196 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1196);
}
,
s if s.matches("instanceOwnerId") /* InstanceOwnerId com.amazonaws.ec2#NetworkInterfaceAttachment$InstanceOwnerId */ => {
let var_1197 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_owner_id(var_1197);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#NetworkInterfaceAttachment$Status */ => {
let var_1198 =
Some(
Result::<crate::model::AttachmentStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AttachmentStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_1198);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_network_interface_permission_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkInterfacePermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInterfacePermissionList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_interface_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_interface_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkInterface>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInterfaceList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_interface(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_placement_group_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PlacementGroup>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PlacementGroupList$member */ => {
out.push(
crate::xml_deser::deser_structure_placement_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_prefix_list_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrefixList>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrefixListSet$member */ => {
out.push(
crate::xml_deser::deser_structure_prefix_list(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_principal_id_format_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrincipalIdFormat>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrincipalIdFormatList$member */ => {
out.push(
crate::xml_deser::deser_structure_principal_id_format(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_public_ipv4_pool_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PublicIpv4Pool>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PublicIpv4PoolSet$member */ => {
out.push(
crate::xml_deser::deser_structure_public_ipv4_pool(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_region_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Region>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RegionList$member */ => {
out.push(
crate::xml_deser::deser_structure_region(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_replace_root_volume_tasks(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReplaceRootVolumeTask>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReplaceRootVolumeTasks$member */ => {
out.push(
crate::xml_deser::deser_structure_replace_root_volume_task(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reserved_instances_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReservedInstances>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstancesList$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reserved_instances_modification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReservedInstancesModification>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstancesModificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances_modification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reserved_instances_offering_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReservedInstancesOffering>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstancesOfferingList$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances_offering(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_route_table_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::RouteTable>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RouteTableList$member */ => {
out.push(
crate::xml_deser::deser_structure_route_table(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_scheduled_instance_availability_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ScheduledInstanceAvailability>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ScheduledInstanceAvailabilitySet$member */ => {
out.push(
crate::xml_deser::deser_structure_scheduled_instance_availability(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_scheduled_instance_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ScheduledInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ScheduledInstanceSet$member */ => {
out.push(
crate::xml_deser::deser_structure_scheduled_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_security_group_references(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SecurityGroupReference>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SecurityGroupReferences$member */ => {
out.push(
crate::xml_deser::deser_structure_security_group_reference(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_security_group_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SecurityGroup>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SecurityGroupList$member */ => {
out.push(
crate::xml_deser::deser_structure_security_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_create_volume_permission_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CreateVolumePermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CreateVolumePermissionList$member */ => {
out.push(
crate::xml_deser::deser_structure_create_volume_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_snapshot_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Snapshot>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SnapshotList$member */ => {
out.push(
crate::xml_deser::deser_structure_snapshot(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_history_records(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::HistoryRecord>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HistoryRecords$member */ => {
out.push(
crate::xml_deser::deser_structure_history_record(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_spot_fleet_request_config_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SpotFleetRequestConfig>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SpotFleetRequestConfigSet$member */ => {
out.push(
crate::xml_deser::deser_structure_spot_fleet_request_config(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_spot_instance_request_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SpotInstanceRequest>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SpotInstanceRequestList$member */ => {
out.push(
crate::xml_deser::deser_structure_spot_instance_request(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_spot_price_history_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SpotPrice>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SpotPriceHistoryList$member */ => {
out.push(
crate::xml_deser::deser_structure_spot_price(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_stale_security_group_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::StaleSecurityGroup>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#StaleSecurityGroupSet$member */ => {
out.push(
crate::xml_deser::deser_structure_stale_security_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_store_image_task_result_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::StoreImageTaskResult>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#StoreImageTaskResultSet$member */ => {
out.push(
crate::xml_deser::deser_structure_store_image_task_result(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_subnet_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Subnet>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SubnetList$member */ => {
out.push(
crate::xml_deser::deser_structure_subnet(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_tag_description_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TagDescription>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TagDescriptionList$member */ => {
out.push(
crate::xml_deser::deser_structure_tag_description(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_traffic_mirror_filter_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrafficMirrorFilter>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrafficMirrorFilterSet$member */ => {
out.push(
crate::xml_deser::deser_structure_traffic_mirror_filter(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_traffic_mirror_session_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrafficMirrorSession>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrafficMirrorSessionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_traffic_mirror_session(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_traffic_mirror_target_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrafficMirrorTarget>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrafficMirrorTargetSet$member */ => {
out.push(
crate::xml_deser::deser_structure_traffic_mirror_target(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayAttachment>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_connect_peer_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayConnectPeer>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayConnectPeerList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_connect_peer(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_connect_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayConnect>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayConnectList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_connect(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_multicast_domain_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayMulticastDomain>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayMulticastDomainList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_peering_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayPeeringAttachment>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayPeeringAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_peering_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_route_table_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayRouteTable>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayRouteTableList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_route_table(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_vpc_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayVpcAttachment>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayVpcAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_vpc_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_trunk_interface_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrunkInterfaceAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrunkInterfaceAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_trunk_interface_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_volume_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Volume>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_volume_modification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeModification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeModificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_modification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_volume_status_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeStatusItem>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeStatusList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_status_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_classic_link_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcClassicLink>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcClassicLinkList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_classic_link(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_classic_link_dns_support_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClassicLinkDnsSupport>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClassicLinkDnsSupportList$member */ => {
out.push(
crate::xml_deser::deser_structure_classic_link_dns_support(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_connection_notification_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ConnectionNotification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ConnectionNotificationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_connection_notification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_endpoint_connection_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcEndpointConnection>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcEndpointConnectionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_endpoint_connection(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_endpoint_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcEndpoint>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcEndpointSet$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_endpoint(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_service_configuration_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ServiceConfiguration>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ServiceConfigurationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_service_configuration(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_allowed_principal_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AllowedPrincipal>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AllowedPrincipalSet$member */ => {
out.push(
crate::xml_deser::deser_structure_allowed_principal(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_service_detail_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ServiceDetail>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ServiceDetailSet$member */ => {
out.push(
crate::xml_deser::deser_structure_service_detail(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_peering_connection_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcPeeringConnection>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcPeeringConnectionList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_peering_connection(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Vpc>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpn_connection_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpnConnection>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpnConnectionList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpn_connection(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpn_gateway_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpnGateway>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpnGatewayList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpn_gateway(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_disable_fast_snapshot_restore_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DisableFastSnapshotRestoreSuccessItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_disable_fast_snapshot_restore_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_disable_fast_snapshot_restore_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DisableFastSnapshotRestoreErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DisableFastSnapshotRestoreErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_disable_fast_snapshot_restore_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_transit_gateway_propagation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayPropagation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayPropagation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayPropagation$TransitGatewayAttachmentId */ => {
let var_1199 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_1199);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayPropagation$ResourceId */ => {
let var_1200 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_1200);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayPropagation$ResourceType */ => {
let var_1201 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_1201);
}
,
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayPropagation$TransitGatewayRouteTableId */ => {
let var_1202 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_1202);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayPropagation$State */ => {
let var_1203 =
Some(
Result::<crate::model::TransitGatewayPropagationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayPropagationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1203);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_enable_fast_snapshot_restore_success_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::EnableFastSnapshotRestoreSuccessItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessSet$member */ => {
out.push(
crate::xml_deser::deser_structure_enable_fast_snapshot_restore_success_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_enable_fast_snapshot_restore_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::EnableFastSnapshotRestoreErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#EnableFastSnapshotRestoreErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_enable_fast_snapshot_restore_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_client_certificate_revocation_list_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientCertificateRevocationListStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientCertificateRevocationListStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientCertificateRevocationListStatus$Code */ => {
let var_1204 =
Some(
Result::<crate::model::ClientCertificateRevocationListStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientCertificateRevocationListStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_1204);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientCertificateRevocationListStatus$Message */ => {
let var_1205 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1205);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_export_task_s3_location(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ExportTaskS3Location, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ExportTaskS3Location::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("s3Bucket") /* S3Bucket com.amazonaws.ec2#ExportTaskS3Location$S3Bucket */ => {
let var_1206 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_bucket(var_1206);
}
,
s if s.matches("s3Prefix") /* S3Prefix com.amazonaws.ec2#ExportTaskS3Location$S3Prefix */ => {
let var_1207 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_prefix(var_1207);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_associated_roles_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AssociatedRole>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AssociatedRolesList$member */ => {
out.push(
crate::xml_deser::deser_structure_associated_role(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_cidr_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6CidrAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6CidrAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_cidr_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_usage_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceUsage>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceUsageSet$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_usage(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_coip_address_usage_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CoipAddressUsage>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CoipAddressUsageSet$member */ => {
out.push(
crate::xml_deser::deser_structure_coip_address_usage(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_family_credit_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceFamilyCreditSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceFamilyCreditSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#InstanceFamilyCreditSpecification$InstanceFamily */ => {
let var_1208 =
Some(
Result::<crate::model::UnlimitedSupportedInstanceFamily, smithy_xml::decode::XmlError>::Ok(
crate::model::UnlimitedSupportedInstanceFamily::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_family(var_1208);
}
,
s if s.matches("cpuCredits") /* CpuCredits com.amazonaws.ec2#InstanceFamilyCreditSpecification$CpuCredits */ => {
let var_1209 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cpu_credits(var_1209);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_capacity_reservation_group_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CapacityReservationGroup>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CapacityReservationGroupSet$member */ => {
out.push(
crate::xml_deser::deser_structure_capacity_reservation_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_purchase_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Purchase>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PurchaseSet$member */ => {
out.push(
crate::xml_deser::deser_structure_purchase(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_response_launch_template_data(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseLaunchTemplateData, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseLaunchTemplateData::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#ResponseLaunchTemplateData$KernelId */ => {
let var_1210 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kernel_id(var_1210);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#ResponseLaunchTemplateData$EbsOptimized */ => {
let var_1211 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_1211);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#ResponseLaunchTemplateData$IamInstanceProfile */ => {
let var_1212 =
Some(
crate::xml_deser::deser_structure_launch_template_iam_instance_profile_specification(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_1212);
}
,
s if s.matches("blockDeviceMappingSet") /* BlockDeviceMappings com.amazonaws.ec2#ResponseLaunchTemplateData$BlockDeviceMappings */ => {
let var_1213 =
Some(
crate::xml_deser::deser_list_launch_template_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_1213);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#ResponseLaunchTemplateData$NetworkInterfaces */ => {
let var_1214 =
Some(
crate::xml_deser::deser_list_launch_template_instance_network_interface_specification_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_1214);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ResponseLaunchTemplateData$ImageId */ => {
let var_1215 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_1215);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceType */ => {
let var_1216 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1216);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#ResponseLaunchTemplateData$KeyName */ => {
let var_1217 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_1217);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#ResponseLaunchTemplateData$Monitoring */ => {
let var_1218 =
Some(
crate::xml_deser::deser_structure_launch_templates_monitoring(&mut tag)
?
)
;
builder = builder.set_monitoring(var_1218);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#ResponseLaunchTemplateData$Placement */ => {
let var_1219 =
Some(
crate::xml_deser::deser_structure_launch_template_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_1219);
}
,
s if s.matches("ramDiskId") /* RamDiskId com.amazonaws.ec2#ResponseLaunchTemplateData$RamDiskId */ => {
let var_1220 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ram_disk_id(var_1220);
}
,
s if s.matches("disableApiTermination") /* DisableApiTermination com.amazonaws.ec2#ResponseLaunchTemplateData$DisableApiTermination */ => {
let var_1221 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_disable_api_termination(var_1221);
}
,
s if s.matches("instanceInitiatedShutdownBehavior") /* InstanceInitiatedShutdownBehavior com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceInitiatedShutdownBehavior */ => {
let var_1222 =
Some(
Result::<crate::model::ShutdownBehavior, smithy_xml::decode::XmlError>::Ok(
crate::model::ShutdownBehavior::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_initiated_shutdown_behavior(var_1222);
}
,
s if s.matches("userData") /* UserData com.amazonaws.ec2#ResponseLaunchTemplateData$UserData */ => {
let var_1223 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_data(var_1223);
}
,
s if s.matches("tagSpecificationSet") /* TagSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$TagSpecifications */ => {
let var_1224 =
Some(
crate::xml_deser::deser_list_launch_template_tag_specification_list(&mut tag)
?
)
;
builder = builder.set_tag_specifications(var_1224);
}
,
s if s.matches("elasticGpuSpecificationSet") /* ElasticGpuSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$ElasticGpuSpecifications */ => {
let var_1225 =
Some(
crate::xml_deser::deser_list_elastic_gpu_specification_response_list(&mut tag)
?
)
;
builder = builder.set_elastic_gpu_specifications(var_1225);
}
,
s if s.matches("elasticInferenceAcceleratorSet") /* ElasticInferenceAccelerators com.amazonaws.ec2#ResponseLaunchTemplateData$ElasticInferenceAccelerators */ => {
let var_1226 =
Some(
crate::xml_deser::deser_list_launch_template_elastic_inference_accelerator_response_list(&mut tag)
?
)
;
builder = builder.set_elastic_inference_accelerators(var_1226);
}
,
s if s.matches("securityGroupIdSet") /* SecurityGroupIds com.amazonaws.ec2#ResponseLaunchTemplateData$SecurityGroupIds */ => {
let var_1227 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_security_group_ids(var_1227);
}
,
s if s.matches("securityGroupSet") /* SecurityGroups com.amazonaws.ec2#ResponseLaunchTemplateData$SecurityGroups */ => {
let var_1228 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_1228);
}
,
s if s.matches("instanceMarketOptions") /* InstanceMarketOptions com.amazonaws.ec2#ResponseLaunchTemplateData$InstanceMarketOptions */ => {
let var_1229 =
Some(
crate::xml_deser::deser_structure_launch_template_instance_market_options(&mut tag)
?
)
;
builder = builder.set_instance_market_options(var_1229);
}
,
s if s.matches("creditSpecification") /* CreditSpecification com.amazonaws.ec2#ResponseLaunchTemplateData$CreditSpecification */ => {
let var_1230 =
Some(
crate::xml_deser::deser_structure_credit_specification(&mut tag)
?
)
;
builder = builder.set_credit_specification(var_1230);
}
,
s if s.matches("cpuOptions") /* CpuOptions com.amazonaws.ec2#ResponseLaunchTemplateData$CpuOptions */ => {
let var_1231 =
Some(
crate::xml_deser::deser_structure_launch_template_cpu_options(&mut tag)
?
)
;
builder = builder.set_cpu_options(var_1231);
}
,
s if s.matches("capacityReservationSpecification") /* CapacityReservationSpecification com.amazonaws.ec2#ResponseLaunchTemplateData$CapacityReservationSpecification */ => {
let var_1232 =
Some(
crate::xml_deser::deser_structure_launch_template_capacity_reservation_specification_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_specification(var_1232);
}
,
s if s.matches("licenseSet") /* LicenseSpecifications com.amazonaws.ec2#ResponseLaunchTemplateData$LicenseSpecifications */ => {
let var_1233 =
Some(
crate::xml_deser::deser_list_launch_template_license_list(&mut tag)
?
)
;
builder = builder.set_license_specifications(var_1233);
}
,
s if s.matches("hibernationOptions") /* HibernationOptions com.amazonaws.ec2#ResponseLaunchTemplateData$HibernationOptions */ => {
let var_1234 =
Some(
crate::xml_deser::deser_structure_launch_template_hibernation_options(&mut tag)
?
)
;
builder = builder.set_hibernation_options(var_1234);
}
,
s if s.matches("metadataOptions") /* MetadataOptions com.amazonaws.ec2#ResponseLaunchTemplateData$MetadataOptions */ => {
let var_1235 =
Some(
crate::xml_deser::deser_structure_launch_template_instance_metadata_options(&mut tag)
?
)
;
builder = builder.set_metadata_options(var_1235);
}
,
s if s.matches("enclaveOptions") /* EnclaveOptions com.amazonaws.ec2#ResponseLaunchTemplateData$EnclaveOptions */ => {
let var_1236 =
Some(
crate::xml_deser::deser_structure_launch_template_enclave_options(&mut tag)
?
)
;
builder = builder.set_enclave_options(var_1236);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_prefix_list_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrefixListAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrefixListAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_prefix_list_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_prefix_list_entry_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrefixListEntry>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrefixListEntrySet$member */ => {
out.push(
crate::xml_deser::deser_structure_prefix_list_entry(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_reservation_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservationValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservationValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ReservationValue$HourlyPrice */ => {
let var_1237 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_1237);
}
,
s if s.matches("remainingTotalValue") /* RemainingTotalValue com.amazonaws.ec2#ReservationValue$RemainingTotalValue */ => {
let var_1238 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_remaining_total_value(var_1238);
}
,
s if s.matches("remainingUpfrontValue") /* RemainingUpfrontValue com.amazonaws.ec2#ReservationValue$RemainingUpfrontValue */ => {
let var_1239 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_remaining_upfront_value(var_1239);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_reserved_instance_reservation_value_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::ReservedInstanceReservationValue>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstanceReservationValueSet$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instance_reservation_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_target_reservation_value_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TargetReservationValue>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TargetReservationValueSet$member */ => {
out.push(
crate::xml_deser::deser_structure_target_reservation_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_subnet_cidr_reservation_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SubnetCidrReservation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SubnetCidrReservationList$member */ => {
out.push(
crate::xml_deser::deser_structure_subnet_cidr_reservation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_attachment_propagation_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayAttachmentPropagation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayAttachmentPropagationList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_attachment_propagation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_multicast_domain_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayMulticastDomainAssociation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayMulticastDomainAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_multicast_domain_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_prefix_list_reference_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayPrefixListReference>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayPrefixListReferenceSet$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_prefix_list_reference(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_route_table_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayRouteTableAssociation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayRouteTableAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_route_table_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_route_table_propagation_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayRouteTablePropagation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayRouteTablePropagationList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_route_table_propagation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_snapshot_detail_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SnapshotDetail>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SnapshotDetailList$member */ => {
out.push(
crate::xml_deser::deser_structure_snapshot_detail(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_import_image_license_specification_list_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::ImportImageLicenseConfigurationResponse>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ImportImageLicenseSpecificationListResponse$member */ => {
out.push(
crate::xml_deser::deser_structure_import_image_license_configuration_response(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_conversion_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ConversionTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ConversionTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("conversionTaskId") /* ConversionTaskId com.amazonaws.ec2#ConversionTask$ConversionTaskId */ => {
let var_1240 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_conversion_task_id(var_1240);
}
,
s if s.matches("expirationTime") /* ExpirationTime com.amazonaws.ec2#ConversionTask$ExpirationTime */ => {
let var_1241 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_expiration_time(var_1241);
}
,
s if s.matches("importInstance") /* ImportInstance com.amazonaws.ec2#ConversionTask$ImportInstance */ => {
let var_1242 =
Some(
crate::xml_deser::deser_structure_import_instance_task_details(&mut tag)
?
)
;
builder = builder.set_import_instance(var_1242);
}
,
s if s.matches("importVolume") /* ImportVolume com.amazonaws.ec2#ConversionTask$ImportVolume */ => {
let var_1243 =
Some(
crate::xml_deser::deser_structure_import_volume_task_details(&mut tag)
?
)
;
builder = builder.set_import_volume(var_1243);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#ConversionTask$State */ => {
let var_1244 =
Some(
Result::<crate::model::ConversionTaskState, smithy_xml::decode::XmlError>::Ok(
crate::model::ConversionTaskState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1244);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ConversionTask$StatusMessage */ => {
let var_1245 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1245);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ConversionTask$Tags */ => {
let var_1246 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1246);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_snapshot_task_detail(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotTaskDetail, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotTaskDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotTaskDetail$Description */ => {
let var_1247 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1247);
}
,
s if s.matches("diskImageSize") /* DiskImageSize com.amazonaws.ec2#SnapshotTaskDetail$DiskImageSize */ => {
let var_1248 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_disk_image_size(var_1248);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#SnapshotTaskDetail$Encrypted */ => {
let var_1249 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_1249);
}
,
s if s.matches("format") /* Format com.amazonaws.ec2#SnapshotTaskDetail$Format */ => {
let var_1250 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_format(var_1250);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#SnapshotTaskDetail$KmsKeyId */ => {
let var_1251 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_1251);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#SnapshotTaskDetail$Progress */ => {
let var_1252 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_1252);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotTaskDetail$SnapshotId */ => {
let var_1253 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_1253);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#SnapshotTaskDetail$Status */ => {
let var_1254 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_1254);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#SnapshotTaskDetail$StatusMessage */ => {
let var_1255 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1255);
}
,
s if s.matches("url") /* Url com.amazonaws.ec2#SnapshotTaskDetail$Url */ => {
let var_1256 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_url(var_1256);
}
,
s if s.matches("userBucket") /* UserBucket com.amazonaws.ec2#SnapshotTaskDetail$UserBucket */ => {
let var_1257 =
Some(
crate::xml_deser::deser_structure_user_bucket_details(&mut tag)
?
)
;
builder = builder.set_user_bucket(var_1257);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_address_attribute(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AddressAttribute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AddressAttribute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#AddressAttribute$PublicIp */ => {
let var_1258 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_1258);
}
,
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#AddressAttribute$AllocationId */ => {
let var_1259 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_1259);
}
,
s if s.matches("ptrRecord") /* PtrRecord com.amazonaws.ec2#AddressAttribute$PtrRecord */ => {
let var_1260 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ptr_record(var_1260);
}
,
s if s.matches("ptrRecordUpdate") /* PtrRecordUpdate com.amazonaws.ec2#AddressAttribute$PtrRecordUpdate */ => {
let var_1261 =
Some(
crate::xml_deser::deser_structure_ptr_update_status(&mut tag)
?
)
;
builder = builder.set_ptr_record_update(var_1261);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_unsuccessful_item_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::UnsuccessfulItem>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UnsuccessfulItemList$member */ => {
out.push(
crate::xml_deser::deser_structure_unsuccessful_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_successful_instance_credit_specification_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::SuccessfulInstanceCreditSpecificationItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SuccessfulInstanceCreditSpecificationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_successful_instance_credit_specification_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_unsuccessful_instance_credit_specification_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::UnsuccessfulInstanceCreditSpecificationItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UnsuccessfulInstanceCreditSpecificationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_unsuccessful_instance_credit_specification_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_status_event(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStatusEvent, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStatusEvent::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceEventId") /* InstanceEventId com.amazonaws.ec2#InstanceStatusEvent$InstanceEventId */ => {
let var_1262 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_event_id(var_1262);
}
,
s if s.matches("code") /* Code com.amazonaws.ec2#InstanceStatusEvent$Code */ => {
let var_1263 =
Some(
Result::<crate::model::EventCode, smithy_xml::decode::XmlError>::Ok(
crate::model::EventCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_1263);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#InstanceStatusEvent$Description */ => {
let var_1264 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1264);
}
,
s if s.matches("notAfter") /* NotAfter com.amazonaws.ec2#InstanceStatusEvent$NotAfter */ => {
let var_1265 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_after(var_1265);
}
,
s if s.matches("notBefore") /* NotBefore com.amazonaws.ec2#InstanceStatusEvent$NotBefore */ => {
let var_1266 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_before(var_1266);
}
,
s if s.matches("notBeforeDeadline") /* NotBeforeDeadline com.amazonaws.ec2#InstanceStatusEvent$NotBeforeDeadline */ => {
let var_1267 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_not_before_deadline(var_1267);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_metadata_options_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceMetadataOptionsResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceMetadataOptionsResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#InstanceMetadataOptionsResponse$State */ => {
let var_1268 =
Some(
Result::<crate::model::InstanceMetadataOptionsState, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceMetadataOptionsState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1268);
}
,
s if s.matches("httpTokens") /* HttpTokens com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpTokens */ => {
let var_1269 =
Some(
Result::<crate::model::HttpTokensState, smithy_xml::decode::XmlError>::Ok(
crate::model::HttpTokensState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_tokens(var_1269);
}
,
s if s.matches("httpPutResponseHopLimit") /* HttpPutResponseHopLimit com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpPutResponseHopLimit */ => {
let var_1270 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_http_put_response_hop_limit(var_1270);
}
,
s if s.matches("httpEndpoint") /* HttpEndpoint com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpEndpoint */ => {
let var_1271 =
Some(
Result::<crate::model::InstanceMetadataEndpointState, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceMetadataEndpointState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_endpoint(var_1271);
}
,
s if s.matches("httpProtocolIpv6") /* HttpProtocolIpv6 com.amazonaws.ec2#InstanceMetadataOptionsResponse$HttpProtocolIpv6 */ => {
let var_1272 =
Some(
Result::<crate::model::InstanceMetadataProtocolState, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceMetadataProtocolState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_protocol_ipv6(var_1272);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_volume_modification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeModification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeModification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeModification$VolumeId */ => {
let var_1273 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_1273);
}
,
s if s.matches("modificationState") /* ModificationState com.amazonaws.ec2#VolumeModification$ModificationState */ => {
let var_1274 =
Some(
Result::<crate::model::VolumeModificationState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeModificationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_modification_state(var_1274);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#VolumeModification$StatusMessage */ => {
let var_1275 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1275);
}
,
s if s.matches("targetSize") /* TargetSize com.amazonaws.ec2#VolumeModification$TargetSize */ => {
let var_1276 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_target_size(var_1276);
}
,
s if s.matches("targetIops") /* TargetIops com.amazonaws.ec2#VolumeModification$TargetIops */ => {
let var_1277 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_target_iops(var_1277);
}
,
s if s.matches("targetVolumeType") /* TargetVolumeType com.amazonaws.ec2#VolumeModification$TargetVolumeType */ => {
let var_1278 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_volume_type(var_1278);
}
,
s if s.matches("targetThroughput") /* TargetThroughput com.amazonaws.ec2#VolumeModification$TargetThroughput */ => {
let var_1279 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_target_throughput(var_1279);
}
,
s if s.matches("targetMultiAttachEnabled") /* TargetMultiAttachEnabled com.amazonaws.ec2#VolumeModification$TargetMultiAttachEnabled */ => {
let var_1280 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_target_multi_attach_enabled(var_1280);
}
,
s if s.matches("originalSize") /* OriginalSize com.amazonaws.ec2#VolumeModification$OriginalSize */ => {
let var_1281 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_original_size(var_1281);
}
,
s if s.matches("originalIops") /* OriginalIops com.amazonaws.ec2#VolumeModification$OriginalIops */ => {
let var_1282 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_original_iops(var_1282);
}
,
s if s.matches("originalVolumeType") /* OriginalVolumeType com.amazonaws.ec2#VolumeModification$OriginalVolumeType */ => {
let var_1283 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_original_volume_type(var_1283);
}
,
s if s.matches("originalThroughput") /* OriginalThroughput com.amazonaws.ec2#VolumeModification$OriginalThroughput */ => {
let var_1284 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_original_throughput(var_1284);
}
,
s if s.matches("originalMultiAttachEnabled") /* OriginalMultiAttachEnabled com.amazonaws.ec2#VolumeModification$OriginalMultiAttachEnabled */ => {
let var_1285 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_original_multi_attach_enabled(var_1285);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#VolumeModification$Progress */ => {
let var_1286 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_progress(var_1286);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#VolumeModification$StartTime */ => {
let var_1287 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_1287);
}
,
s if s.matches("endTime") /* EndTime com.amazonaws.ec2#VolumeModification$EndTime */ => {
let var_1288 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end_time(var_1288);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_peering_connection_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PeeringConnectionOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PeeringConnectionOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allowDnsResolutionFromRemoteVpc") /* AllowDnsResolutionFromRemoteVpc com.amazonaws.ec2#PeeringConnectionOptions$AllowDnsResolutionFromRemoteVpc */ => {
let var_1289 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_dns_resolution_from_remote_vpc(var_1289);
}
,
s if s.matches("allowEgressFromLocalClassicLinkToRemoteVpc") /* AllowEgressFromLocalClassicLinkToRemoteVpc com.amazonaws.ec2#PeeringConnectionOptions$AllowEgressFromLocalClassicLinkToRemoteVpc */ => {
let var_1290 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_egress_from_local_classic_link_to_remote_vpc(var_1290);
}
,
s if s.matches("allowEgressFromLocalVpcToRemoteClassicLink") /* AllowEgressFromLocalVpcToRemoteClassicLink com.amazonaws.ec2#PeeringConnectionOptions$AllowEgressFromLocalVpcToRemoteClassicLink */ => {
let var_1291 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_egress_from_local_vpc_to_remote_classic_link(var_1291);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_monitoring_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceMonitoring>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceMonitoringList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_monitoring(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_purchased_scheduled_instance_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ScheduledInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PurchasedScheduledInstanceSet$member */ => {
out.push(
crate::xml_deser::deser_structure_scheduled_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_transit_gateway_multicast_registered_group_members(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastRegisteredGroupMembers, smithy_xml::decode::XmlError>
{
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastRegisteredGroupMembers::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupMembers$TransitGatewayMulticastDomainId */ => {
let var_1292 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_1292);
}
,
s if s.matches("registeredNetworkInterfaceIds") /* RegisteredNetworkInterfaceIds com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupMembers$RegisteredNetworkInterfaceIds */ => {
let var_1293 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_registered_network_interface_ids(var_1293);
}
,
s if s.matches("groupIpAddress") /* GroupIpAddress com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupMembers$GroupIpAddress */ => {
let var_1294 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_ip_address(var_1294);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_registered_group_sources(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastRegisteredGroupSources, smithy_xml::decode::XmlError>
{
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastRegisteredGroupSources::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayMulticastDomainId") /* TransitGatewayMulticastDomainId com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupSources$TransitGatewayMulticastDomainId */ => {
let var_1295 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_multicast_domain_id(var_1295);
}
,
s if s.matches("registeredNetworkInterfaceIds") /* RegisteredNetworkInterfaceIds com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupSources$RegisteredNetworkInterfaceIds */ => {
let var_1296 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_registered_network_interface_ids(var_1296);
}
,
s if s.matches("groupIpAddress") /* GroupIpAddress com.amazonaws.ec2#TransitGatewayMulticastRegisteredGroupSources$GroupIpAddress */ => {
let var_1297 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_ip_address(var_1297);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_ip_permission_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::IpPermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IpPermissionList$member */ => {
out.push(
crate::xml_deser::deser_structure_ip_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Instance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_id_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIdSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_route_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LocalGatewayRoute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayRouteList$member */ => {
out.push(
crate::xml_deser::deser_structure_local_gateway_route(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_multicast_group_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayMulticastGroup>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayMulticastGroupList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_multicast_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_route_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayRoute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayRouteList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_route(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_state_change_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceStateChange>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceStateChangeList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_state_change(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_network_insights_analysis(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInsightsAnalysis, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInsightsAnalysis::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkInsightsAnalysisId") /* NetworkInsightsAnalysisId com.amazonaws.ec2#NetworkInsightsAnalysis$NetworkInsightsAnalysisId */ => {
let var_1298 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_analysis_id(var_1298);
}
,
s if s.matches("networkInsightsAnalysisArn") /* NetworkInsightsAnalysisArn com.amazonaws.ec2#NetworkInsightsAnalysis$NetworkInsightsAnalysisArn */ => {
let var_1299 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_analysis_arn(var_1299);
}
,
s if s.matches("networkInsightsPathId") /* NetworkInsightsPathId com.amazonaws.ec2#NetworkInsightsAnalysis$NetworkInsightsPathId */ => {
let var_1300 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_insights_path_id(var_1300);
}
,
s if s.matches("filterInArnSet") /* FilterInArns com.amazonaws.ec2#NetworkInsightsAnalysis$FilterInArns */ => {
let var_1301 =
Some(
crate::xml_deser::deser_list_arn_list(&mut tag)
?
)
;
builder = builder.set_filter_in_arns(var_1301);
}
,
s if s.matches("startDate") /* StartDate com.amazonaws.ec2#NetworkInsightsAnalysis$StartDate */ => {
let var_1302 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_date(var_1302);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#NetworkInsightsAnalysis$Status */ => {
let var_1303 =
Some(
Result::<crate::model::AnalysisStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AnalysisStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_1303);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#NetworkInsightsAnalysis$StatusMessage */ => {
let var_1304 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1304);
}
,
s if s.matches("networkPathFound") /* NetworkPathFound com.amazonaws.ec2#NetworkInsightsAnalysis$NetworkPathFound */ => {
let var_1305 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_network_path_found(var_1305);
}
,
s if s.matches("forwardPathComponentSet") /* ForwardPathComponents com.amazonaws.ec2#NetworkInsightsAnalysis$ForwardPathComponents */ => {
let var_1306 =
Some(
crate::xml_deser::deser_list_path_component_list(&mut tag)
?
)
;
builder = builder.set_forward_path_components(var_1306);
}
,
s if s.matches("returnPathComponentSet") /* ReturnPathComponents com.amazonaws.ec2#NetworkInsightsAnalysis$ReturnPathComponents */ => {
let var_1307 =
Some(
crate::xml_deser::deser_list_path_component_list(&mut tag)
?
)
;
builder = builder.set_return_path_components(var_1307);
}
,
s if s.matches("explanationSet") /* Explanations com.amazonaws.ec2#NetworkInsightsAnalysis$Explanations */ => {
let var_1308 =
Some(
crate::xml_deser::deser_list_explanation_list(&mut tag)
?
)
;
builder = builder.set_explanations(var_1308);
}
,
s if s.matches("alternatePathHintSet") /* AlternatePathHints com.amazonaws.ec2#NetworkInsightsAnalysis$AlternatePathHints */ => {
let var_1309 =
Some(
crate::xml_deser::deser_list_alternate_path_hint_list(&mut tag)
?
)
;
builder = builder.set_alternate_path_hints(var_1309);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#NetworkInsightsAnalysis$Tags */ => {
let var_1310 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1310);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_terminate_connection_status_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TerminateConnectionStatus>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TerminateConnectionStatusSet$member */ => {
out.push(
crate::xml_deser::deser_structure_terminate_connection_status(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_subnet_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SubnetAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SubnetAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_subnet_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_peering_tgw_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PeeringTgwInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PeeringTgwInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#PeeringTgwInfo$TransitGatewayId */ => {
let var_1311 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_1311);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#PeeringTgwInfo$OwnerId */ => {
let var_1312 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1312);
}
,
s if s.matches("region") /* Region com.amazonaws.ec2#PeeringTgwInfo$Region */ => {
let var_1313 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_region(var_1313);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_peering_attachment_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PeeringAttachmentStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PeeringAttachmentStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#PeeringAttachmentStatus$Code */ => {
let var_1314 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_1314);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#PeeringAttachmentStatus$Message */ => {
let var_1315 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1315);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_vpc_attachment_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayVpcAttachmentOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayVpcAttachmentOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dnsSupport") /* DnsSupport com.amazonaws.ec2#TransitGatewayVpcAttachmentOptions$DnsSupport */ => {
let var_1316 =
Some(
Result::<crate::model::DnsSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::DnsSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_dns_support(var_1316);
}
,
s if s.matches("ipv6Support") /* Ipv6Support com.amazonaws.ec2#TransitGatewayVpcAttachmentOptions$Ipv6Support */ => {
let var_1317 =
Some(
Result::<crate::model::Ipv6SupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::Ipv6SupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_ipv6_support(var_1317);
}
,
s if s.matches("applianceModeSupport") /* ApplianceModeSupport com.amazonaws.ec2#TransitGatewayVpcAttachmentOptions$ApplianceModeSupport */ => {
let var_1318 =
Some(
Result::<crate::model::ApplianceModeSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::ApplianceModeSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_appliance_mode_support(var_1318);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_unsuccessful_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::UnsuccessfulItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::UnsuccessfulItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("error") /* Error com.amazonaws.ec2#UnsuccessfulItem$Error */ => {
let var_1319 =
Some(
crate::xml_deser::deser_structure_unsuccessful_item_error(&mut tag)
?
)
;
builder = builder.set_error(var_1319);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#UnsuccessfulItem$ResourceId */ => {
let var_1320 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_1320);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_peering_connection_vpc_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcPeeringConnectionVpcInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcPeeringConnectionVpcInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$CidrBlock */ => {
let var_1321 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_1321);
}
,
s if s.matches("ipv6CidrBlockSet") /* Ipv6CidrBlockSet com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$Ipv6CidrBlockSet */ => {
let var_1322 =
Some(
crate::xml_deser::deser_list_ipv6_cidr_block_set(&mut tag)
?
)
;
builder = builder.set_ipv6_cidr_block_set(var_1322);
}
,
s if s.matches("cidrBlockSet") /* CidrBlockSet com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$CidrBlockSet */ => {
let var_1323 =
Some(
crate::xml_deser::deser_list_cidr_block_set(&mut tag)
?
)
;
builder = builder.set_cidr_block_set(var_1323);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$OwnerId */ => {
let var_1324 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1324);
}
,
s if s.matches("peeringOptions") /* PeeringOptions com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$PeeringOptions */ => {
let var_1325 =
Some(
crate::xml_deser::deser_structure_vpc_peering_connection_options_description(&mut tag)
?
)
;
builder = builder.set_peering_options(var_1325);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$VpcId */ => {
let var_1326 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1326);
}
,
s if s.matches("region") /* Region com.amazonaws.ec2#VpcPeeringConnectionVpcInfo$Region */ => {
let var_1327 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_region(var_1327);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_peering_connection_state_reason(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcPeeringConnectionStateReason, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcPeeringConnectionStateReason::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#VpcPeeringConnectionStateReason$Code */ => {
let var_1328 =
Some(
Result::<crate::model::VpcPeeringConnectionStateReasonCode, smithy_xml::decode::XmlError>::Ok(
crate::model::VpcPeeringConnectionStateReasonCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_1328);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#VpcPeeringConnectionStateReason$Message */ => {
let var_1329 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1329);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_assigned_private_ip_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AssignedPrivateIpAddress, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AssignedPrivateIpAddress::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#AssignedPrivateIpAddress$PrivateIpAddress */ => {
let var_1330 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_1330);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv4_prefix_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv4PrefixSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv4PrefixSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv4Prefix") /* Ipv4Prefix com.amazonaws.ec2#Ipv4PrefixSpecification$Ipv4Prefix */ => {
let var_1331 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv4_prefix(var_1331);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_iam_instance_profile(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IamInstanceProfile, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IamInstanceProfile::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("arn") /* Arn com.amazonaws.ec2#IamInstanceProfile$Arn */ => {
let var_1332 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_1332);
}
,
s if s.matches("id") /* Id com.amazonaws.ec2#IamInstanceProfile$Id */ => {
let var_1333 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_1333);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_event_window_time_range_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceEventWindowTimeRange>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceEventWindowTimeRangeList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_event_window_time_range(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_event_window_association_target(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceEventWindowAssociationTarget, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceEventWindowAssociationTarget::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceIdSet") /* InstanceIds com.amazonaws.ec2#InstanceEventWindowAssociationTarget$InstanceIds */ => {
let var_1334 =
Some(
crate::xml_deser::deser_list_instance_id_list(&mut tag)
?
)
;
builder = builder.set_instance_ids(var_1334);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#InstanceEventWindowAssociationTarget$Tags */ => {
let var_1335 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1335);
}
,
s if s.matches("dedicatedHostIdSet") /* DedicatedHostIds com.amazonaws.ec2#InstanceEventWindowAssociationTarget$DedicatedHostIds */ => {
let var_1336 =
Some(
crate::xml_deser::deser_list_dedicated_host_id_list(&mut tag)
?
)
;
builder = builder.set_dedicated_host_ids(var_1336);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_subnet_cidr_block_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SubnetCidrBlockState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SubnetCidrBlockState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#SubnetCidrBlockState$State */ => {
let var_1337 =
Some(
Result::<crate::model::SubnetCidrBlockStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::SubnetCidrBlockStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1337);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#SubnetCidrBlockState$StatusMessage */ => {
let var_1338 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1338);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_cidr_block_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcCidrBlockState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcCidrBlockState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#VpcCidrBlockState$State */ => {
let var_1339 =
Some(
Result::<crate::model::VpcCidrBlockStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::VpcCidrBlockStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1339);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#VpcCidrBlockState$StatusMessage */ => {
let var_1340 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1340);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_security_group_rule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SecurityGroupRule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SecurityGroupRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("securityGroupRuleId") /* SecurityGroupRuleId com.amazonaws.ec2#SecurityGroupRule$SecurityGroupRuleId */ => {
let var_1341 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_security_group_rule_id(var_1341);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroupRule$GroupId */ => {
let var_1342 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1342);
}
,
s if s.matches("groupOwnerId") /* GroupOwnerId com.amazonaws.ec2#SecurityGroupRule$GroupOwnerId */ => {
let var_1343 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_owner_id(var_1343);
}
,
s if s.matches("isEgress") /* IsEgress com.amazonaws.ec2#SecurityGroupRule$IsEgress */ => {
let var_1344 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_is_egress(var_1344);
}
,
s if s.matches("ipProtocol") /* IpProtocol com.amazonaws.ec2#SecurityGroupRule$IpProtocol */ => {
let var_1345 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_protocol(var_1345);
}
,
s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#SecurityGroupRule$FromPort */ => {
let var_1346 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_from_port(var_1346);
}
,
s if s.matches("toPort") /* ToPort com.amazonaws.ec2#SecurityGroupRule$ToPort */ => {
let var_1347 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_to_port(var_1347);
}
,
s if s.matches("cidrIpv4") /* CidrIpv4 com.amazonaws.ec2#SecurityGroupRule$CidrIpv4 */ => {
let var_1348 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_ipv4(var_1348);
}
,
s if s.matches("cidrIpv6") /* CidrIpv6 com.amazonaws.ec2#SecurityGroupRule$CidrIpv6 */ => {
let var_1349 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_ipv6(var_1349);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#SecurityGroupRule$PrefixListId */ => {
let var_1350 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_1350);
}
,
s if s.matches("referencedGroupInfo") /* ReferencedGroupInfo com.amazonaws.ec2#SecurityGroupRule$ReferencedGroupInfo */ => {
let var_1351 =
Some(
crate::xml_deser::deser_structure_referenced_security_group(&mut tag)
?
)
;
builder = builder.set_referenced_group_info(var_1351);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#SecurityGroupRule$Description */ => {
let var_1352 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1352);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SecurityGroupRule$Tags */ => {
let var_1353 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1353);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_bundle_task_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::BundleTaskError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::BundleTaskError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#BundleTaskError$Code */ => {
let var_1354 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_1354);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#BundleTaskError$Message */ => {
let var_1355 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1355);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_storage(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Storage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("S3") /* S3 com.amazonaws.ec2#Storage$S3 */ => {
let var_1356 =
Some(
crate::xml_deser::deser_structure_s3_storage(&mut tag)
?
)
;
builder = builder.set_s3(var_1356);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_listing(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesListing, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesListing::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#ReservedInstancesListing$ClientToken */ => {
let var_1357 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_1357);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ReservedInstancesListing$CreateDate */ => {
let var_1358 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1358);
}
,
s if s.matches("instanceCounts") /* InstanceCounts com.amazonaws.ec2#ReservedInstancesListing$InstanceCounts */ => {
let var_1359 =
Some(
crate::xml_deser::deser_list_instance_count_list(&mut tag)
?
)
;
builder = builder.set_instance_counts(var_1359);
}
,
s if s.matches("priceSchedules") /* PriceSchedules com.amazonaws.ec2#ReservedInstancesListing$PriceSchedules */ => {
let var_1360 =
Some(
crate::xml_deser::deser_list_price_schedule_list(&mut tag)
?
)
;
builder = builder.set_price_schedules(var_1360);
}
,
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#ReservedInstancesListing$ReservedInstancesId */ => {
let var_1361 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_1361);
}
,
s if s.matches("reservedInstancesListingId") /* ReservedInstancesListingId com.amazonaws.ec2#ReservedInstancesListing$ReservedInstancesListingId */ => {
let var_1362 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_listing_id(var_1362);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ReservedInstancesListing$Status */ => {
let var_1363 =
Some(
Result::<crate::model::ListingStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::ListingStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_1363);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ReservedInstancesListing$StatusMessage */ => {
let var_1364 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1364);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ReservedInstancesListing$Tags */ => {
let var_1365 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1365);
}
,
s if s.matches("updateDate") /* UpdateDate com.amazonaws.ec2#ReservedInstancesListing$UpdateDate */ => {
let var_1366 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_update_date(var_1366);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_cancel_spot_fleet_requests_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CancelSpotFleetRequestsSuccessItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CancelSpotFleetRequestsSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currentSpotFleetRequestState") /* CurrentSpotFleetRequestState com.amazonaws.ec2#CancelSpotFleetRequestsSuccessItem$CurrentSpotFleetRequestState */ => {
let var_1367 =
Some(
Result::<crate::model::BatchState, smithy_xml::decode::XmlError>::Ok(
crate::model::BatchState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_current_spot_fleet_request_state(var_1367);
}
,
s if s.matches("previousSpotFleetRequestState") /* PreviousSpotFleetRequestState com.amazonaws.ec2#CancelSpotFleetRequestsSuccessItem$PreviousSpotFleetRequestState */ => {
let var_1368 =
Some(
Result::<crate::model::BatchState, smithy_xml::decode::XmlError>::Ok(
crate::model::BatchState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_previous_spot_fleet_request_state(var_1368);
}
,
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#CancelSpotFleetRequestsSuccessItem$SpotFleetRequestId */ => {
let var_1369 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_1369);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_cancel_spot_fleet_requests_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CancelSpotFleetRequestsErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CancelSpotFleetRequestsErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("error") /* Error com.amazonaws.ec2#CancelSpotFleetRequestsErrorItem$Error */ => {
let var_1370 =
Some(
crate::xml_deser::deser_structure_cancel_spot_fleet_requests_error(&mut tag)
?
)
;
builder = builder.set_error(var_1370);
}
,
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#CancelSpotFleetRequestsErrorItem$SpotFleetRequestId */ => {
let var_1371 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_1371);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_cancelled_spot_instance_request(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CancelledSpotInstanceRequest, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CancelledSpotInstanceRequest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("spotInstanceRequestId") /* SpotInstanceRequestId com.amazonaws.ec2#CancelledSpotInstanceRequest$SpotInstanceRequestId */ => {
let var_1372 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_instance_request_id(var_1372);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#CancelledSpotInstanceRequest$State */ => {
let var_1373 =
Some(
Result::<crate::model::CancelSpotInstanceRequestState, smithy_xml::decode::XmlError>::Ok(
crate::model::CancelSpotInstanceRequestState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1373);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_tag(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Tag, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Tag::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#Tag$Key */ => {
let var_1374 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_1374);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#Tag$Value */ => {
let var_1375 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1375);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_subnet_ipv6_cidr_block_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SubnetIpv6CidrBlockAssociation>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SubnetIpv6CidrBlockAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_subnet_ipv6_cidr_block_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_ipv6_cidr_block_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcIpv6CidrBlockAssociation>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcIpv6CidrBlockAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_ipv6_cidr_block_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_cidr_block_association_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcCidrBlockAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcCidrBlockAssociationSet$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_cidr_block_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_dhcp_configuration_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DhcpConfiguration>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DhcpConfigurationList$member */ => {
out.push(
crate::xml_deser::deser_structure_dhcp_configuration(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_internet_gateway_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InternetGatewayAttachment>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InternetGatewayAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_internet_gateway_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_create_fleet_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CreateFleetError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CreateFleetError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateAndOverrides") /* LaunchTemplateAndOverrides com.amazonaws.ec2#CreateFleetError$LaunchTemplateAndOverrides */ => {
let var_1376 =
Some(
crate::xml_deser::deser_structure_launch_template_and_overrides_response(&mut tag)
?
)
;
builder = builder.set_launch_template_and_overrides(var_1376);
}
,
s if s.matches("lifecycle") /* Lifecycle com.amazonaws.ec2#CreateFleetError$Lifecycle */ => {
let var_1377 =
Some(
Result::<crate::model::InstanceLifecycle, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceLifecycle::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_lifecycle(var_1377);
}
,
s if s.matches("errorCode") /* ErrorCode com.amazonaws.ec2#CreateFleetError$ErrorCode */ => {
let var_1378 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_error_code(var_1378);
}
,
s if s.matches("errorMessage") /* ErrorMessage com.amazonaws.ec2#CreateFleetError$ErrorMessage */ => {
let var_1379 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_error_message(var_1379);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_create_fleet_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CreateFleetInstance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CreateFleetInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateAndOverrides") /* LaunchTemplateAndOverrides com.amazonaws.ec2#CreateFleetInstance$LaunchTemplateAndOverrides */ => {
let var_1380 =
Some(
crate::xml_deser::deser_structure_launch_template_and_overrides_response(&mut tag)
?
)
;
builder = builder.set_launch_template_and_overrides(var_1380);
}
,
s if s.matches("lifecycle") /* Lifecycle com.amazonaws.ec2#CreateFleetInstance$Lifecycle */ => {
let var_1381 =
Some(
Result::<crate::model::InstanceLifecycle, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceLifecycle::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_lifecycle(var_1381);
}
,
s if s.matches("instanceIds") /* InstanceIds com.amazonaws.ec2#CreateFleetInstance$InstanceIds */ => {
let var_1382 =
Some(
crate::xml_deser::deser_list_instance_ids_set(&mut tag)
?
)
;
builder = builder.set_instance_ids(var_1382);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#CreateFleetInstance$InstanceType */ => {
let var_1383 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1383);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#CreateFleetInstance$Platform */ => {
let var_1384 =
Some(
Result::<crate::model::PlatformValues, smithy_xml::decode::XmlError>::Ok(
crate::model::PlatformValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_platform(var_1384);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_export_to_s3_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ExportToS3Task, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ExportToS3Task::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("containerFormat") /* ContainerFormat com.amazonaws.ec2#ExportToS3Task$ContainerFormat */ => {
let var_1385 =
Some(
Result::<crate::model::ContainerFormat, smithy_xml::decode::XmlError>::Ok(
crate::model::ContainerFormat::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_container_format(var_1385);
}
,
s if s.matches("diskImageFormat") /* DiskImageFormat com.amazonaws.ec2#ExportToS3Task$DiskImageFormat */ => {
let var_1386 =
Some(
Result::<crate::model::DiskImageFormat, smithy_xml::decode::XmlError>::Ok(
crate::model::DiskImageFormat::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_disk_image_format(var_1386);
}
,
s if s.matches("s3Bucket") /* S3Bucket com.amazonaws.ec2#ExportToS3Task$S3Bucket */ => {
let var_1387 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_bucket(var_1387);
}
,
s if s.matches("s3Key") /* S3Key com.amazonaws.ec2#ExportToS3Task$S3Key */ => {
let var_1388 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_key(var_1388);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_export_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceExportDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceExportDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceExportDetails$InstanceId */ => {
let var_1389 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1389);
}
,
s if s.matches("targetEnvironment") /* TargetEnvironment com.amazonaws.ec2#InstanceExportDetails$TargetEnvironment */ => {
let var_1390 =
Some(
Result::<crate::model::ExportEnvironment, smithy_xml::decode::XmlError>::Ok(
crate::model::ExportEnvironment::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_target_environment(var_1390);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ValidationError>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_validation_error(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_nat_gateway_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NatGatewayAddress>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NatGatewayAddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_nat_gateway_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_provisioned_bandwidth(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProvisionedBandwidth, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProvisionedBandwidth::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("provisionTime") /* ProvisionTime com.amazonaws.ec2#ProvisionedBandwidth$ProvisionTime */ => {
let var_1391 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_provision_time(var_1391);
}
,
s if s.matches("provisioned") /* Provisioned com.amazonaws.ec2#ProvisionedBandwidth$Provisioned */ => {
let var_1392 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_provisioned(var_1392);
}
,
s if s.matches("requestTime") /* RequestTime com.amazonaws.ec2#ProvisionedBandwidth$RequestTime */ => {
let var_1393 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_request_time(var_1393);
}
,
s if s.matches("requested") /* Requested com.amazonaws.ec2#ProvisionedBandwidth$Requested */ => {
let var_1394 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_requested(var_1394);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ProvisionedBandwidth$Status */ => {
let var_1395 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_1395);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_network_acl_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkAclAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkAclAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_acl_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_acl_entry_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkAclEntry>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkAclEntryList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_acl_entry(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_network_interface_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfaceAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfaceAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#NetworkInterfaceAssociation$AllocationId */ => {
let var_1396 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_1396);
}
,
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#NetworkInterfaceAssociation$AssociationId */ => {
let var_1397 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_1397);
}
,
s if s.matches("ipOwnerId") /* IpOwnerId com.amazonaws.ec2#NetworkInterfaceAssociation$IpOwnerId */ => {
let var_1398 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_owner_id(var_1398);
}
,
s if s.matches("publicDnsName") /* PublicDnsName com.amazonaws.ec2#NetworkInterfaceAssociation$PublicDnsName */ => {
let var_1399 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_dns_name(var_1399);
}
,
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#NetworkInterfaceAssociation$PublicIp */ => {
let var_1400 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_1400);
}
,
s if s.matches("customerOwnedIp") /* CustomerOwnedIp com.amazonaws.ec2#NetworkInterfaceAssociation$CustomerOwnedIp */ => {
let var_1401 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ip(var_1401);
}
,
s if s.matches("carrierIp") /* CarrierIp com.amazonaws.ec2#NetworkInterfaceAssociation$CarrierIp */ => {
let var_1402 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_ip(var_1402);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_network_interface_ipv6_addresses_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkInterfaceIpv6Address>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInterfaceIpv6AddressesList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_interface_ipv6_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_network_interface_private_ip_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::NetworkInterfacePrivateIpAddress>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkInterfacePrivateIpAddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_interface_private_ip_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_prefixes_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6PrefixSpecification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6PrefixesList$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_prefix_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_network_interface_permission_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfacePermissionState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfacePermissionState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#NetworkInterfacePermissionState$State */ => {
let var_1403 =
Some(
Result::<crate::model::NetworkInterfacePermissionStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::NetworkInterfacePermissionStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1403);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#NetworkInterfacePermissionState$StatusMessage */ => {
let var_1404 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1404);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_route_table_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::RouteTableAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RouteTableAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_route_table_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_propagating_vgw_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PropagatingVgw>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PropagatingVgwList$member */ => {
out.push(
crate::xml_deser::deser_structure_propagating_vgw(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_route_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Route>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RouteList$member */ => {
out.push(
crate::xml_deser::deser_structure_route(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_snapshot_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotInfo$Description */ => {
let var_1405 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1405);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SnapshotInfo$Tags */ => {
let var_1406 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1406);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#SnapshotInfo$Encrypted */ => {
let var_1407 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_1407);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#SnapshotInfo$VolumeId */ => {
let var_1408 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_1408);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#SnapshotInfo$State */ => {
let var_1409 =
Some(
Result::<crate::model::SnapshotState, smithy_xml::decode::XmlError>::Ok(
crate::model::SnapshotState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1409);
}
,
s if s.matches("volumeSize") /* VolumeSize com.amazonaws.ec2#SnapshotInfo$VolumeSize */ => {
let var_1410 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_volume_size(var_1410);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#SnapshotInfo$StartTime */ => {
let var_1411 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_start_time(var_1411);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#SnapshotInfo$Progress */ => {
let var_1412 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_1412);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#SnapshotInfo$OwnerId */ => {
let var_1413 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1413);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotInfo$SnapshotId */ => {
let var_1414 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_1414);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#SnapshotInfo$OutpostArn */ => {
let var_1415 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1415);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_instance_state_fault(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotInstanceStateFault, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotInstanceStateFault::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#SpotInstanceStateFault$Code */ => {
let var_1416 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_1416);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#SpotInstanceStateFault$Message */ => {
let var_1417 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1417);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_traffic_mirror_filter_rule_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrafficMirrorFilterRule>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrafficMirrorFilterRuleList$member */ => {
out.push(
crate::xml_deser::deser_structure_traffic_mirror_filter_rule(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_traffic_mirror_network_service_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TrafficMirrorNetworkService>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TrafficMirrorNetworkServiceList$member */ => {
out.push(
Result::<crate::model::TrafficMirrorNetworkService, smithy_xml::decode::XmlError>::Ok(
crate::model::TrafficMirrorNetworkService::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_traffic_mirror_port_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TrafficMirrorPortRange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TrafficMirrorPortRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#TrafficMirrorPortRange$FromPort */ => {
let var_1418 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_from_port(var_1418);
}
,
s if s.matches("toPort") /* ToPort com.amazonaws.ec2#TrafficMirrorPortRange$ToPort */ => {
let var_1419 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_to_port(var_1419);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amazonSideAsn") /* AmazonSideAsn com.amazonaws.ec2#TransitGatewayOptions$AmazonSideAsn */ => {
let var_1420 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_amazon_side_asn(var_1420);
}
,
s if s.matches("transitGatewayCidrBlocks") /* TransitGatewayCidrBlocks com.amazonaws.ec2#TransitGatewayOptions$TransitGatewayCidrBlocks */ => {
let var_1421 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_transit_gateway_cidr_blocks(var_1421);
}
,
s if s.matches("autoAcceptSharedAttachments") /* AutoAcceptSharedAttachments com.amazonaws.ec2#TransitGatewayOptions$AutoAcceptSharedAttachments */ => {
let var_1422 =
Some(
Result::<crate::model::AutoAcceptSharedAttachmentsValue, smithy_xml::decode::XmlError>::Ok(
crate::model::AutoAcceptSharedAttachmentsValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_auto_accept_shared_attachments(var_1422);
}
,
s if s.matches("defaultRouteTableAssociation") /* DefaultRouteTableAssociation com.amazonaws.ec2#TransitGatewayOptions$DefaultRouteTableAssociation */ => {
let var_1423 =
Some(
Result::<crate::model::DefaultRouteTableAssociationValue, smithy_xml::decode::XmlError>::Ok(
crate::model::DefaultRouteTableAssociationValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_route_table_association(var_1423);
}
,
s if s.matches("associationDefaultRouteTableId") /* AssociationDefaultRouteTableId com.amazonaws.ec2#TransitGatewayOptions$AssociationDefaultRouteTableId */ => {
let var_1424 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_default_route_table_id(var_1424);
}
,
s if s.matches("defaultRouteTablePropagation") /* DefaultRouteTablePropagation com.amazonaws.ec2#TransitGatewayOptions$DefaultRouteTablePropagation */ => {
let var_1425 =
Some(
Result::<crate::model::DefaultRouteTablePropagationValue, smithy_xml::decode::XmlError>::Ok(
crate::model::DefaultRouteTablePropagationValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_route_table_propagation(var_1425);
}
,
s if s.matches("propagationDefaultRouteTableId") /* PropagationDefaultRouteTableId com.amazonaws.ec2#TransitGatewayOptions$PropagationDefaultRouteTableId */ => {
let var_1426 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_propagation_default_route_table_id(var_1426);
}
,
s if s.matches("vpnEcmpSupport") /* VpnEcmpSupport com.amazonaws.ec2#TransitGatewayOptions$VpnEcmpSupport */ => {
let var_1427 =
Some(
Result::<crate::model::VpnEcmpSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnEcmpSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_vpn_ecmp_support(var_1427);
}
,
s if s.matches("dnsSupport") /* DnsSupport com.amazonaws.ec2#TransitGatewayOptions$DnsSupport */ => {
let var_1428 =
Some(
Result::<crate::model::DnsSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::DnsSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_dns_support(var_1428);
}
,
s if s.matches("multicastSupport") /* MulticastSupport com.amazonaws.ec2#TransitGatewayOptions$MulticastSupport */ => {
let var_1429 =
Some(
Result::<crate::model::MulticastSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::MulticastSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_multicast_support(var_1429);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_connect_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayConnectOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayConnectOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TransitGatewayConnectOptions$Protocol */ => {
let var_1430 =
Some(
Result::<crate::model::ProtocolValue, smithy_xml::decode::XmlError>::Ok(
crate::model::ProtocolValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_protocol(var_1430);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_connect_peer_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayConnectPeerConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayConnectPeerConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAddress") /* TransitGatewayAddress com.amazonaws.ec2#TransitGatewayConnectPeerConfiguration$TransitGatewayAddress */ => {
let var_1431 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_address(var_1431);
}
,
s if s.matches("peerAddress") /* PeerAddress com.amazonaws.ec2#TransitGatewayConnectPeerConfiguration$PeerAddress */ => {
let var_1432 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_peer_address(var_1432);
}
,
s if s.matches("insideCidrBlocks") /* InsideCidrBlocks com.amazonaws.ec2#TransitGatewayConnectPeerConfiguration$InsideCidrBlocks */ => {
let var_1433 =
Some(
crate::xml_deser::deser_list_inside_cidr_blocks_string_list(&mut tag)
?
)
;
builder = builder.set_inside_cidr_blocks(var_1433);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#TransitGatewayConnectPeerConfiguration$Protocol */ => {
let var_1434 =
Some(
Result::<crate::model::ProtocolValue, smithy_xml::decode::XmlError>::Ok(
crate::model::ProtocolValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_protocol(var_1434);
}
,
s if s.matches("bgpConfigurations") /* BgpConfigurations com.amazonaws.ec2#TransitGatewayConnectPeerConfiguration$BgpConfigurations */ => {
let var_1435 =
Some(
crate::xml_deser::deser_list_transit_gateway_attachment_bgp_configuration_list(&mut tag)
?
)
;
builder = builder.set_bgp_configurations(var_1435);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_domain_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastDomainOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDomainOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("igmpv2Support") /* Igmpv2Support com.amazonaws.ec2#TransitGatewayMulticastDomainOptions$Igmpv2Support */ => {
let var_1436 =
Some(
Result::<crate::model::Igmpv2SupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::Igmpv2SupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_igmpv2_support(var_1436);
}
,
s if s.matches("staticSourcesSupport") /* StaticSourcesSupport com.amazonaws.ec2#TransitGatewayMulticastDomainOptions$StaticSourcesSupport */ => {
let var_1437 =
Some(
Result::<crate::model::StaticSourcesSupportValue, smithy_xml::decode::XmlError>::Ok(
crate::model::StaticSourcesSupportValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_static_sources_support(var_1437);
}
,
s if s.matches("autoAcceptSharedAssociations") /* AutoAcceptSharedAssociations com.amazonaws.ec2#TransitGatewayMulticastDomainOptions$AutoAcceptSharedAssociations */ => {
let var_1438 =
Some(
Result::<crate::model::AutoAcceptSharedAssociationsValue, smithy_xml::decode::XmlError>::Ok(
crate::model::AutoAcceptSharedAssociationsValue::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_auto_accept_shared_associations(var_1438);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_prefix_list_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayPrefixListAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayPrefixListAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayPrefixListAttachment$TransitGatewayAttachmentId */ => {
let var_1439 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_1439);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayPrefixListAttachment$ResourceType */ => {
let var_1440 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_1440);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayPrefixListAttachment$ResourceId */ => {
let var_1441 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_1441);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_transit_gateway_route_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TransitGatewayRouteAttachment>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayRouteAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_route_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_volume_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#VolumeAttachment$AttachTime */ => {
let var_1442 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_1442);
}
,
s if s.matches("device") /* Device com.amazonaws.ec2#VolumeAttachment$Device */ => {
let var_1443 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device(var_1443);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeAttachment$InstanceId */ => {
let var_1444 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1444);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#VolumeAttachment$State */ => {
let var_1445 =
Some(
Result::<crate::model::VolumeAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1445);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeAttachment$VolumeId */ => {
let var_1446 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_1446);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#VolumeAttachment$DeleteOnTermination */ => {
let var_1447 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_1447);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_group_identifier_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SecurityGroupIdentifier>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#GroupIdentifierSet$member */ => {
out.push(
crate::xml_deser::deser_structure_security_group_identifier(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_dns_entry_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DnsEntry>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DnsEntrySet$member */ => {
out.push(
crate::xml_deser::deser_structure_dns_entry(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_last_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LastError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LastError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") /* Message com.amazonaws.ec2#LastError$Message */ => {
let var_1448 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_1448);
}
,
s if s.matches("code") /* Code com.amazonaws.ec2#LastError$Code */ => {
let var_1449 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_1449);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_service_type_detail_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ServiceTypeDetail>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ServiceTypeDetailSet$member */ => {
out.push(
crate::xml_deser::deser_structure_service_type_detail(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_private_dns_name_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateDnsNameConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateDnsNameConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#PrivateDnsNameConfiguration$State */ => {
let var_1450 =
Some(
Result::<crate::model::DnsNameState, smithy_xml::decode::XmlError>::Ok(
crate::model::DnsNameState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1450);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#PrivateDnsNameConfiguration$Type */ => {
let var_1451 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_type(var_1451);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#PrivateDnsNameConfiguration$Value */ => {
let var_1452 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_1452);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#PrivateDnsNameConfiguration$Name */ => {
let var_1453 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_1453);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpn_connection_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnConnectionOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnConnectionOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enableAcceleration") /* EnableAcceleration com.amazonaws.ec2#VpnConnectionOptions$EnableAcceleration */ => {
let var_1454 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enable_acceleration(var_1454);
}
,
s if s.matches("staticRoutesOnly") /* StaticRoutesOnly com.amazonaws.ec2#VpnConnectionOptions$StaticRoutesOnly */ => {
let var_1455 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_static_routes_only(var_1455);
}
,
s if s.matches("localIpv4NetworkCidr") /* LocalIpv4NetworkCidr com.amazonaws.ec2#VpnConnectionOptions$LocalIpv4NetworkCidr */ => {
let var_1456 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_ipv4_network_cidr(var_1456);
}
,
s if s.matches("remoteIpv4NetworkCidr") /* RemoteIpv4NetworkCidr com.amazonaws.ec2#VpnConnectionOptions$RemoteIpv4NetworkCidr */ => {
let var_1457 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_remote_ipv4_network_cidr(var_1457);
}
,
s if s.matches("localIpv6NetworkCidr") /* LocalIpv6NetworkCidr com.amazonaws.ec2#VpnConnectionOptions$LocalIpv6NetworkCidr */ => {
let var_1458 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_ipv6_network_cidr(var_1458);
}
,
s if s.matches("remoteIpv6NetworkCidr") /* RemoteIpv6NetworkCidr com.amazonaws.ec2#VpnConnectionOptions$RemoteIpv6NetworkCidr */ => {
let var_1459 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_remote_ipv6_network_cidr(var_1459);
}
,
s if s.matches("tunnelInsideIpVersion") /* TunnelInsideIpVersion com.amazonaws.ec2#VpnConnectionOptions$TunnelInsideIpVersion */ => {
let var_1460 =
Some(
Result::<crate::model::TunnelInsideIpVersion, smithy_xml::decode::XmlError>::Ok(
crate::model::TunnelInsideIpVersion::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tunnel_inside_ip_version(var_1460);
}
,
s if s.matches("tunnelOptionSet") /* TunnelOptions com.amazonaws.ec2#VpnConnectionOptions$TunnelOptions */ => {
let var_1461 =
Some(
crate::xml_deser::deser_list_tunnel_options_list(&mut tag)
?
)
;
builder = builder.set_tunnel_options(var_1461);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_vpn_static_route_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpnStaticRoute>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpnStaticRouteList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpn_static_route(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vgw_telemetry_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VgwTelemetry>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VgwTelemetryList$member */ => {
out.push(
crate::xml_deser::deser_structure_vgw_telemetry(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_vpc_attachment_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VpcAttachment>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VpcAttachmentList$member */ => {
out.push(
crate::xml_deser::deser_structure_vpc_attachment(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_delete_fleet_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteFleetSuccessItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteFleetSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currentFleetState") /* CurrentFleetState com.amazonaws.ec2#DeleteFleetSuccessItem$CurrentFleetState */ => {
let var_1462 =
Some(
Result::<crate::model::FleetStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_current_fleet_state(var_1462);
}
,
s if s.matches("previousFleetState") /* PreviousFleetState com.amazonaws.ec2#DeleteFleetSuccessItem$PreviousFleetState */ => {
let var_1463 =
Some(
Result::<crate::model::FleetStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_previous_fleet_state(var_1463);
}
,
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#DeleteFleetSuccessItem$FleetId */ => {
let var_1464 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_1464);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_delete_fleet_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteFleetErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteFleetErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("error") /* Error com.amazonaws.ec2#DeleteFleetErrorItem$Error */ => {
let var_1465 =
Some(
crate::xml_deser::deser_structure_delete_fleet_error(&mut tag)
?
)
;
builder = builder.set_error(var_1465);
}
,
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#DeleteFleetErrorItem$FleetId */ => {
let var_1466 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_1466);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_delete_launch_template_versions_response_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteLaunchTemplateVersionsResponseSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateId") /* LaunchTemplateId com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseSuccessItem$LaunchTemplateId */ => {
let var_1467 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_id(var_1467);
}
,
s if s.matches("launchTemplateName") /* LaunchTemplateName com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseSuccessItem$LaunchTemplateName */ => {
let var_1468 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_name(var_1468);
}
,
s if s.matches("versionNumber") /* VersionNumber com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseSuccessItem$VersionNumber */ => {
let var_1469 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_version_number(var_1469);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_delete_launch_template_versions_response_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteLaunchTemplateVersionsResponseErrorItem, smithy_xml::decode::XmlError>
{
#[allow(unused_mut)]
let mut builder = crate::model::DeleteLaunchTemplateVersionsResponseErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateId") /* LaunchTemplateId com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseErrorItem$LaunchTemplateId */ => {
let var_1470 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_id(var_1470);
}
,
s if s.matches("launchTemplateName") /* LaunchTemplateName com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseErrorItem$LaunchTemplateName */ => {
let var_1471 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_name(var_1471);
}
,
s if s.matches("versionNumber") /* VersionNumber com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseErrorItem$VersionNumber */ => {
let var_1472 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_version_number(var_1472);
}
,
s if s.matches("responseError") /* ResponseError com.amazonaws.ec2#DeleteLaunchTemplateVersionsResponseErrorItem$ResponseError */ => {
let var_1473 =
Some(
crate::xml_deser::deser_structure_response_error(&mut tag)
?
)
;
builder = builder.set_response_error(var_1473);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_successful_queued_purchase_deletion(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SuccessfulQueuedPurchaseDeletion, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SuccessfulQueuedPurchaseDeletion::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#SuccessfulQueuedPurchaseDeletion$ReservedInstancesId */ => {
let var_1474 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_1474);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_failed_queued_purchase_deletion(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FailedQueuedPurchaseDeletion, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FailedQueuedPurchaseDeletion::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("error") /* Error com.amazonaws.ec2#FailedQueuedPurchaseDeletion$Error */ => {
let var_1475 =
Some(
crate::xml_deser::deser_structure_delete_queued_reserved_instances_error(&mut tag)
?
)
;
builder = builder.set_error(var_1475);
}
,
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#FailedQueuedPurchaseDeletion$ReservedInstancesId */ => {
let var_1476 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_1476);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_tag_key_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceTagKeySet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_account_attribute(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccountAttribute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccountAttribute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attributeName") /* AttributeName com.amazonaws.ec2#AccountAttribute$AttributeName */ => {
let var_1477 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_attribute_name(var_1477);
}
,
s if s.matches("attributeValueSet") /* AttributeValues com.amazonaws.ec2#AccountAttribute$AttributeValues */ => {
let var_1478 =
Some(
crate::xml_deser::deser_list_account_attribute_value_list(&mut tag)
?
)
;
builder = builder.set_attribute_values(var_1478);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Address, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Address::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#Address$InstanceId */ => {
let var_1479 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1479);
}
,
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#Address$PublicIp */ => {
let var_1480 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_1480);
}
,
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#Address$AllocationId */ => {
let var_1481 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_1481);
}
,
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#Address$AssociationId */ => {
let var_1482 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_1482);
}
,
s if s.matches("domain") /* Domain com.amazonaws.ec2#Address$Domain */ => {
let var_1483 =
Some(
Result::<crate::model::DomainType, smithy_xml::decode::XmlError>::Ok(
crate::model::DomainType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_domain(var_1483);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#Address$NetworkInterfaceId */ => {
let var_1484 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_1484);
}
,
s if s.matches("networkInterfaceOwnerId") /* NetworkInterfaceOwnerId com.amazonaws.ec2#Address$NetworkInterfaceOwnerId */ => {
let var_1485 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_owner_id(var_1485);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#Address$PrivateIpAddress */ => {
let var_1486 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_1486);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Address$Tags */ => {
let var_1487 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1487);
}
,
s if s.matches("publicIpv4Pool") /* PublicIpv4Pool com.amazonaws.ec2#Address$PublicIpv4Pool */ => {
let var_1488 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ipv4_pool(var_1488);
}
,
s if s.matches("networkBorderGroup") /* NetworkBorderGroup com.amazonaws.ec2#Address$NetworkBorderGroup */ => {
let var_1489 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_border_group(var_1489);
}
,
s if s.matches("customerOwnedIp") /* CustomerOwnedIp com.amazonaws.ec2#Address$CustomerOwnedIp */ => {
let var_1490 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ip(var_1490);
}
,
s if s.matches("customerOwnedIpv4Pool") /* CustomerOwnedIpv4Pool com.amazonaws.ec2#Address$CustomerOwnedIpv4Pool */ => {
let var_1491 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_customer_owned_ipv4_pool(var_1491);
}
,
s if s.matches("carrierIp") /* CarrierIp com.amazonaws.ec2#Address$CarrierIp */ => {
let var_1492 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_ip(var_1492);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_id_format(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IdFormat, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IdFormat::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deadline") /* Deadline com.amazonaws.ec2#IdFormat$Deadline */ => {
let var_1493 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_deadline(var_1493);
}
,
s if s.matches("resource") /* Resource com.amazonaws.ec2#IdFormat$Resource */ => {
let var_1494 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource(var_1494);
}
,
s if s.matches("useLongIds") /* UseLongIds com.amazonaws.ec2#IdFormat$UseLongIds */ => {
let var_1495 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_use_long_ids(var_1495);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_availability_zone(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AvailabilityZone, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AvailabilityZone::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("zoneState") /* State com.amazonaws.ec2#AvailabilityZone$State */ => {
let var_1496 =
Some(
Result::<crate::model::AvailabilityZoneState, smithy_xml::decode::XmlError>::Ok(
crate::model::AvailabilityZoneState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1496);
}
,
s if s.matches("optInStatus") /* OptInStatus com.amazonaws.ec2#AvailabilityZone$OptInStatus */ => {
let var_1497 =
Some(
Result::<crate::model::AvailabilityZoneOptInStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AvailabilityZoneOptInStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_opt_in_status(var_1497);
}
,
s if s.matches("messageSet") /* Messages com.amazonaws.ec2#AvailabilityZone$Messages */ => {
let var_1498 =
Some(
crate::xml_deser::deser_list_availability_zone_message_list(&mut tag)
?
)
;
builder = builder.set_messages(var_1498);
}
,
s if s.matches("regionName") /* RegionName com.amazonaws.ec2#AvailabilityZone$RegionName */ => {
let var_1499 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_region_name(var_1499);
}
,
s if s.matches("zoneName") /* ZoneName com.amazonaws.ec2#AvailabilityZone$ZoneName */ => {
let var_1500 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_zone_name(var_1500);
}
,
s if s.matches("zoneId") /* ZoneId com.amazonaws.ec2#AvailabilityZone$ZoneId */ => {
let var_1501 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_zone_id(var_1501);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#AvailabilityZone$GroupName */ => {
let var_1502 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_1502);
}
,
s if s.matches("networkBorderGroup") /* NetworkBorderGroup com.amazonaws.ec2#AvailabilityZone$NetworkBorderGroup */ => {
let var_1503 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_border_group(var_1503);
}
,
s if s.matches("zoneType") /* ZoneType com.amazonaws.ec2#AvailabilityZone$ZoneType */ => {
let var_1504 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_zone_type(var_1504);
}
,
s if s.matches("parentZoneName") /* ParentZoneName com.amazonaws.ec2#AvailabilityZone$ParentZoneName */ => {
let var_1505 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_parent_zone_name(var_1505);
}
,
s if s.matches("parentZoneId") /* ParentZoneId com.amazonaws.ec2#AvailabilityZone$ParentZoneId */ => {
let var_1506 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_parent_zone_id(var_1506);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_classic_link_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClassicLinkInstance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClassicLinkInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#ClassicLinkInstance$Groups */ => {
let var_1507 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_1507);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ClassicLinkInstance$InstanceId */ => {
let var_1508 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1508);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ClassicLinkInstance$Tags */ => {
let var_1509 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1509);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#ClassicLinkInstance$VpcId */ => {
let var_1510 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1510);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_authorization_rule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AuthorizationRule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AuthorizationRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#AuthorizationRule$ClientVpnEndpointId */ => {
let var_1511 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_1511);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#AuthorizationRule$Description */ => {
let var_1512 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1512);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#AuthorizationRule$GroupId */ => {
let var_1513 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1513);
}
,
s if s.matches("accessAll") /* AccessAll com.amazonaws.ec2#AuthorizationRule$AccessAll */ => {
let var_1514 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_access_all(var_1514);
}
,
s if s.matches("destinationCidr") /* DestinationCidr com.amazonaws.ec2#AuthorizationRule$DestinationCidr */ => {
let var_1515 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr(var_1515);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#AuthorizationRule$Status */ => {
let var_1516 =
Some(
crate::xml_deser::deser_structure_client_vpn_authorization_rule_status(&mut tag)
?
)
;
builder = builder.set_status(var_1516);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_connection(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnConnection, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnConnection::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#ClientVpnConnection$ClientVpnEndpointId */ => {
let var_1517 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_1517);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#ClientVpnConnection$Timestamp */ => {
let var_1518 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_timestamp(var_1518);
}
,
s if s.matches("connectionId") /* ConnectionId com.amazonaws.ec2#ClientVpnConnection$ConnectionId */ => {
let var_1519 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_id(var_1519);
}
,
s if s.matches("username") /* Username com.amazonaws.ec2#ClientVpnConnection$Username */ => {
let var_1520 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_username(var_1520);
}
,
s if s.matches("connectionEstablishedTime") /* ConnectionEstablishedTime com.amazonaws.ec2#ClientVpnConnection$ConnectionEstablishedTime */ => {
let var_1521 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_established_time(var_1521);
}
,
s if s.matches("ingressBytes") /* IngressBytes com.amazonaws.ec2#ClientVpnConnection$IngressBytes */ => {
let var_1522 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ingress_bytes(var_1522);
}
,
s if s.matches("egressBytes") /* EgressBytes com.amazonaws.ec2#ClientVpnConnection$EgressBytes */ => {
let var_1523 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_egress_bytes(var_1523);
}
,
s if s.matches("ingressPackets") /* IngressPackets com.amazonaws.ec2#ClientVpnConnection$IngressPackets */ => {
let var_1524 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ingress_packets(var_1524);
}
,
s if s.matches("egressPackets") /* EgressPackets com.amazonaws.ec2#ClientVpnConnection$EgressPackets */ => {
let var_1525 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_egress_packets(var_1525);
}
,
s if s.matches("clientIp") /* ClientIp com.amazonaws.ec2#ClientVpnConnection$ClientIp */ => {
let var_1526 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_ip(var_1526);
}
,
s if s.matches("commonName") /* CommonName com.amazonaws.ec2#ClientVpnConnection$CommonName */ => {
let var_1527 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_common_name(var_1527);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ClientVpnConnection$Status */ => {
let var_1528 =
Some(
crate::xml_deser::deser_structure_client_vpn_connection_status(&mut tag)
?
)
;
builder = builder.set_status(var_1528);
}
,
s if s.matches("connectionEndTime") /* ConnectionEndTime com.amazonaws.ec2#ClientVpnConnection$ConnectionEndTime */ => {
let var_1529 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_end_time(var_1529);
}
,
s if s.matches("postureComplianceStatusSet") /* PostureComplianceStatuses com.amazonaws.ec2#ClientVpnConnection$PostureComplianceStatuses */ => {
let var_1530 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_posture_compliance_statuses(var_1530);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_endpoint(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnEndpoint, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnEndpoint::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#ClientVpnEndpoint$ClientVpnEndpointId */ => {
let var_1531 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_1531);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ClientVpnEndpoint$Description */ => {
let var_1532 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1532);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ClientVpnEndpoint$Status */ => {
let var_1533 =
Some(
crate::xml_deser::deser_structure_client_vpn_endpoint_status(&mut tag)
?
)
;
builder = builder.set_status(var_1533);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#ClientVpnEndpoint$CreationTime */ => {
let var_1534 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_creation_time(var_1534);
}
,
s if s.matches("deletionTime") /* DeletionTime com.amazonaws.ec2#ClientVpnEndpoint$DeletionTime */ => {
let var_1535 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_deletion_time(var_1535);
}
,
s if s.matches("dnsName") /* DnsName com.amazonaws.ec2#ClientVpnEndpoint$DnsName */ => {
let var_1536 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dns_name(var_1536);
}
,
s if s.matches("clientCidrBlock") /* ClientCidrBlock com.amazonaws.ec2#ClientVpnEndpoint$ClientCidrBlock */ => {
let var_1537 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_cidr_block(var_1537);
}
,
s if s.matches("dnsServer") /* DnsServers com.amazonaws.ec2#ClientVpnEndpoint$DnsServers */ => {
let var_1538 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_dns_servers(var_1538);
}
,
s if s.matches("splitTunnel") /* SplitTunnel com.amazonaws.ec2#ClientVpnEndpoint$SplitTunnel */ => {
let var_1539 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_split_tunnel(var_1539);
}
,
s if s.matches("vpnProtocol") /* VpnProtocol com.amazonaws.ec2#ClientVpnEndpoint$VpnProtocol */ => {
let var_1540 =
Some(
Result::<crate::model::VpnProtocol, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnProtocol::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_vpn_protocol(var_1540);
}
,
s if s.matches("transportProtocol") /* TransportProtocol com.amazonaws.ec2#ClientVpnEndpoint$TransportProtocol */ => {
let var_1541 =
Some(
Result::<crate::model::TransportProtocol, smithy_xml::decode::XmlError>::Ok(
crate::model::TransportProtocol::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_transport_protocol(var_1541);
}
,
s if s.matches("vpnPort") /* VpnPort com.amazonaws.ec2#ClientVpnEndpoint$VpnPort */ => {
let var_1542 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_vpn_port(var_1542);
}
,
s if s.matches("associatedTargetNetwork") /* AssociatedTargetNetworks com.amazonaws.ec2#ClientVpnEndpoint$AssociatedTargetNetworks */ => {
let var_1543 =
Some(
crate::xml_deser::deser_list_associated_target_network_set(&mut tag)
?
)
;
builder = builder.set_associated_target_networks(var_1543);
}
,
s if s.matches("serverCertificateArn") /* ServerCertificateArn com.amazonaws.ec2#ClientVpnEndpoint$ServerCertificateArn */ => {
let var_1544 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_server_certificate_arn(var_1544);
}
,
s if s.matches("authenticationOptions") /* AuthenticationOptions com.amazonaws.ec2#ClientVpnEndpoint$AuthenticationOptions */ => {
let var_1545 =
Some(
crate::xml_deser::deser_list_client_vpn_authentication_list(&mut tag)
?
)
;
builder = builder.set_authentication_options(var_1545);
}
,
s if s.matches("connectionLogOptions") /* ConnectionLogOptions com.amazonaws.ec2#ClientVpnEndpoint$ConnectionLogOptions */ => {
let var_1546 =
Some(
crate::xml_deser::deser_structure_connection_log_response_options(&mut tag)
?
)
;
builder = builder.set_connection_log_options(var_1546);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ClientVpnEndpoint$Tags */ => {
let var_1547 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1547);
}
,
s if s.matches("securityGroupIdSet") /* SecurityGroupIds com.amazonaws.ec2#ClientVpnEndpoint$SecurityGroupIds */ => {
let var_1548 =
Some(
crate::xml_deser::deser_list_client_vpn_security_group_id_set(&mut tag)
?
)
;
builder = builder.set_security_group_ids(var_1548);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#ClientVpnEndpoint$VpcId */ => {
let var_1549 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1549);
}
,
s if s.matches("selfServicePortalUrl") /* SelfServicePortalUrl com.amazonaws.ec2#ClientVpnEndpoint$SelfServicePortalUrl */ => {
let var_1550 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_self_service_portal_url(var_1550);
}
,
s if s.matches("clientConnectOptions") /* ClientConnectOptions com.amazonaws.ec2#ClientVpnEndpoint$ClientConnectOptions */ => {
let var_1551 =
Some(
crate::xml_deser::deser_structure_client_connect_response_options(&mut tag)
?
)
;
builder = builder.set_client_connect_options(var_1551);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnRoute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnRoute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#ClientVpnRoute$ClientVpnEndpointId */ => {
let var_1552 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_1552);
}
,
s if s.matches("destinationCidr") /* DestinationCidr com.amazonaws.ec2#ClientVpnRoute$DestinationCidr */ => {
let var_1553 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr(var_1553);
}
,
s if s.matches("targetSubnet") /* TargetSubnet com.amazonaws.ec2#ClientVpnRoute$TargetSubnet */ => {
let var_1554 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_target_subnet(var_1554);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#ClientVpnRoute$Type */ => {
let var_1555 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_type(var_1555);
}
,
s if s.matches("origin") /* Origin com.amazonaws.ec2#ClientVpnRoute$Origin */ => {
let var_1556 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin(var_1556);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ClientVpnRoute$Status */ => {
let var_1557 =
Some(
crate::xml_deser::deser_structure_client_vpn_route_status(&mut tag)
?
)
;
builder = builder.set_status(var_1557);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ClientVpnRoute$Description */ => {
let var_1558 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1558);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_target_network(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetNetwork, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetNetwork::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associationId") /* AssociationId com.amazonaws.ec2#TargetNetwork$AssociationId */ => {
let var_1559 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_association_id(var_1559);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#TargetNetwork$VpcId */ => {
let var_1560 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1560);
}
,
s if s.matches("targetNetworkId") /* TargetNetworkId com.amazonaws.ec2#TargetNetwork$TargetNetworkId */ => {
let var_1561 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_target_network_id(var_1561);
}
,
s if s.matches("clientVpnEndpointId") /* ClientVpnEndpointId com.amazonaws.ec2#TargetNetwork$ClientVpnEndpointId */ => {
let var_1562 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_vpn_endpoint_id(var_1562);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#TargetNetwork$Status */ => {
let var_1563 =
Some(
crate::xml_deser::deser_structure_association_status(&mut tag)
?
)
;
builder = builder.set_status(var_1563);
}
,
s if s.matches("securityGroups") /* SecurityGroups com.amazonaws.ec2#TargetNetwork$SecurityGroups */ => {
let var_1564 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_1564);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_coip_pool(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CoipPool, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CoipPool::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("poolId") /* PoolId com.amazonaws.ec2#CoipPool$PoolId */ => {
let var_1565 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_pool_id(var_1565);
}
,
s if s.matches("poolCidrSet") /* PoolCidrs com.amazonaws.ec2#CoipPool$PoolCidrs */ => {
let var_1566 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_pool_cidrs(var_1566);
}
,
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#CoipPool$LocalGatewayRouteTableId */ => {
let var_1567 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_1567);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#CoipPool$Tags */ => {
let var_1568 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1568);
}
,
s if s.matches("poolArn") /* PoolArn com.amazonaws.ec2#CoipPool$PoolArn */ => {
let var_1569 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_pool_arn(var_1569);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_elastic_gpus(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ElasticGpus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ElasticGpus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("elasticGpuId") /* ElasticGpuId com.amazonaws.ec2#ElasticGpus$ElasticGpuId */ => {
let var_1570 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_id(var_1570);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ElasticGpus$AvailabilityZone */ => {
let var_1571 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1571);
}
,
s if s.matches("elasticGpuType") /* ElasticGpuType com.amazonaws.ec2#ElasticGpus$ElasticGpuType */ => {
let var_1572 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_type(var_1572);
}
,
s if s.matches("elasticGpuHealth") /* ElasticGpuHealth com.amazonaws.ec2#ElasticGpus$ElasticGpuHealth */ => {
let var_1573 =
Some(
crate::xml_deser::deser_structure_elastic_gpu_health(&mut tag)
?
)
;
builder = builder.set_elastic_gpu_health(var_1573);
}
,
s if s.matches("elasticGpuState") /* ElasticGpuState com.amazonaws.ec2#ElasticGpus$ElasticGpuState */ => {
let var_1574 =
Some(
Result::<crate::model::ElasticGpuState, smithy_xml::decode::XmlError>::Ok(
crate::model::ElasticGpuState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_elastic_gpu_state(var_1574);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ElasticGpus$InstanceId */ => {
let var_1575 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1575);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ElasticGpus$Tags */ => {
let var_1576 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1576);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_export_image_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ExportImageTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ExportImageTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ExportImageTask$Description */ => {
let var_1577 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1577);
}
,
s if s.matches("exportImageTaskId") /* ExportImageTaskId com.amazonaws.ec2#ExportImageTask$ExportImageTaskId */ => {
let var_1578 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_export_image_task_id(var_1578);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ExportImageTask$ImageId */ => {
let var_1579 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_1579);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#ExportImageTask$Progress */ => {
let var_1580 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_1580);
}
,
s if s.matches("s3ExportLocation") /* S3ExportLocation com.amazonaws.ec2#ExportImageTask$S3ExportLocation */ => {
let var_1581 =
Some(
crate::xml_deser::deser_structure_export_task_s3_location(&mut tag)
?
)
;
builder = builder.set_s3_export_location(var_1581);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ExportImageTask$Status */ => {
let var_1582 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_1582);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ExportImageTask$StatusMessage */ => {
let var_1583 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1583);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ExportImageTask$Tags */ => {
let var_1584 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1584);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_describe_fast_snapshot_restore_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DescribeFastSnapshotRestoreSuccessItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DescribeFastSnapshotRestoreSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$SnapshotId */ => {
let var_1585 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_1585);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$AvailabilityZone */ => {
let var_1586 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1586);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$State */ => {
let var_1587 =
Some(
Result::<crate::model::FastSnapshotRestoreStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FastSnapshotRestoreStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1587);
}
,
s if s.matches("stateTransitionReason") /* StateTransitionReason com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$StateTransitionReason */ => {
let var_1588 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_transition_reason(var_1588);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$OwnerId */ => {
let var_1589 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1589);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$OwnerAlias */ => {
let var_1590 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_1590);
}
,
s if s.matches("enablingTime") /* EnablingTime com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$EnablingTime */ => {
let var_1591 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabling_time(var_1591);
}
,
s if s.matches("optimizingTime") /* OptimizingTime com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$OptimizingTime */ => {
let var_1592 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_optimizing_time(var_1592);
}
,
s if s.matches("enabledTime") /* EnabledTime com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$EnabledTime */ => {
let var_1593 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabled_time(var_1593);
}
,
s if s.matches("disablingTime") /* DisablingTime com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$DisablingTime */ => {
let var_1594 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabling_time(var_1594);
}
,
s if s.matches("disabledTime") /* DisabledTime com.amazonaws.ec2#DescribeFastSnapshotRestoreSuccessItem$DisabledTime */ => {
let var_1595 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabled_time(var_1595);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_history_record_entry(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HistoryRecordEntry, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HistoryRecordEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("eventInformation") /* EventInformation com.amazonaws.ec2#HistoryRecordEntry$EventInformation */ => {
let var_1596 =
Some(
crate::xml_deser::deser_structure_event_information(&mut tag)
?
)
;
builder = builder.set_event_information(var_1596);
}
,
s if s.matches("eventType") /* EventType com.amazonaws.ec2#HistoryRecordEntry$EventType */ => {
let var_1597 =
Some(
Result::<crate::model::FleetEventType, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetEventType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_event_type(var_1597);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#HistoryRecordEntry$Timestamp */ => {
let var_1598 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_1598);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_active_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ActiveInstance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ActiveInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ActiveInstance$InstanceId */ => {
let var_1599 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1599);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ActiveInstance$InstanceType */ => {
let var_1600 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_1600);
}
,
s if s.matches("spotInstanceRequestId") /* SpotInstanceRequestId com.amazonaws.ec2#ActiveInstance$SpotInstanceRequestId */ => {
let var_1601 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_instance_request_id(var_1601);
}
,
s if s.matches("instanceHealth") /* InstanceHealth com.amazonaws.ec2#ActiveInstance$InstanceHealth */ => {
let var_1602 =
Some(
Result::<crate::model::InstanceHealthStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceHealthStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_health(var_1602);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fleet_data(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetData, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetData::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("activityStatus") /* ActivityStatus com.amazonaws.ec2#FleetData$ActivityStatus */ => {
let var_1603 =
Some(
Result::<crate::model::FleetActivityStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetActivityStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_activity_status(var_1603);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#FleetData$CreateTime */ => {
let var_1604 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_1604);
}
,
s if s.matches("fleetId") /* FleetId com.amazonaws.ec2#FleetData$FleetId */ => {
let var_1605 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fleet_id(var_1605);
}
,
s if s.matches("fleetState") /* FleetState com.amazonaws.ec2#FleetData$FleetState */ => {
let var_1606 =
Some(
Result::<crate::model::FleetStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_fleet_state(var_1606);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#FleetData$ClientToken */ => {
let var_1607 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_1607);
}
,
s if s.matches("excessCapacityTerminationPolicy") /* ExcessCapacityTerminationPolicy com.amazonaws.ec2#FleetData$ExcessCapacityTerminationPolicy */ => {
let var_1608 =
Some(
Result::<crate::model::FleetExcessCapacityTerminationPolicy, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetExcessCapacityTerminationPolicy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_excess_capacity_termination_policy(var_1608);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#FleetData$FulfilledCapacity */ => {
let var_1609 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_fulfilled_capacity(var_1609);
}
,
s if s.matches("fulfilledOnDemandCapacity") /* FulfilledOnDemandCapacity com.amazonaws.ec2#FleetData$FulfilledOnDemandCapacity */ => {
let var_1610 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_fulfilled_on_demand_capacity(var_1610);
}
,
s if s.matches("launchTemplateConfigs") /* LaunchTemplateConfigs com.amazonaws.ec2#FleetData$LaunchTemplateConfigs */ => {
let var_1611 =
Some(
crate::xml_deser::deser_list_fleet_launch_template_config_list(&mut tag)
?
)
;
builder = builder.set_launch_template_configs(var_1611);
}
,
s if s.matches("targetCapacitySpecification") /* TargetCapacitySpecification com.amazonaws.ec2#FleetData$TargetCapacitySpecification */ => {
let var_1612 =
Some(
crate::xml_deser::deser_structure_target_capacity_specification(&mut tag)
?
)
;
builder = builder.set_target_capacity_specification(var_1612);
}
,
s if s.matches("terminateInstancesWithExpiration") /* TerminateInstancesWithExpiration com.amazonaws.ec2#FleetData$TerminateInstancesWithExpiration */ => {
let var_1613 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_terminate_instances_with_expiration(var_1613);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#FleetData$Type */ => {
let var_1614 =
Some(
Result::<crate::model::FleetType, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1614);
}
,
s if s.matches("validFrom") /* ValidFrom com.amazonaws.ec2#FleetData$ValidFrom */ => {
let var_1615 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_from(var_1615);
}
,
s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#FleetData$ValidUntil */ => {
let var_1616 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_until(var_1616);
}
,
s if s.matches("replaceUnhealthyInstances") /* ReplaceUnhealthyInstances com.amazonaws.ec2#FleetData$ReplaceUnhealthyInstances */ => {
let var_1617 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_replace_unhealthy_instances(var_1617);
}
,
s if s.matches("spotOptions") /* SpotOptions com.amazonaws.ec2#FleetData$SpotOptions */ => {
let var_1618 =
Some(
crate::xml_deser::deser_structure_spot_options(&mut tag)
?
)
;
builder = builder.set_spot_options(var_1618);
}
,
s if s.matches("onDemandOptions") /* OnDemandOptions com.amazonaws.ec2#FleetData$OnDemandOptions */ => {
let var_1619 =
Some(
crate::xml_deser::deser_structure_on_demand_options(&mut tag)
?
)
;
builder = builder.set_on_demand_options(var_1619);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#FleetData$Tags */ => {
let var_1620 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1620);
}
,
s if s.matches("errorSet") /* Errors com.amazonaws.ec2#FleetData$Errors */ => {
let var_1621 =
Some(
crate::xml_deser::deser_list_describe_fleets_error_set(&mut tag)
?
)
;
builder = builder.set_errors(var_1621);
}
,
s if s.matches("fleetInstanceSet") /* Instances com.amazonaws.ec2#FleetData$Instances */ => {
let var_1622 =
Some(
crate::xml_deser::deser_list_describe_fleets_instances_set(&mut tag)
?
)
;
builder = builder.set_instances(var_1622);
}
,
s if s.matches("context") /* Context com.amazonaws.ec2#FleetData$Context */ => {
let var_1623 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_context(var_1623);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_flow_log(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FlowLog, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FlowLog::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#FlowLog$CreationTime */ => {
let var_1624 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_creation_time(var_1624);
}
,
s if s.matches("deliverLogsErrorMessage") /* DeliverLogsErrorMessage com.amazonaws.ec2#FlowLog$DeliverLogsErrorMessage */ => {
let var_1625 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_deliver_logs_error_message(var_1625);
}
,
s if s.matches("deliverLogsPermissionArn") /* DeliverLogsPermissionArn com.amazonaws.ec2#FlowLog$DeliverLogsPermissionArn */ => {
let var_1626 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_deliver_logs_permission_arn(var_1626);
}
,
s if s.matches("deliverLogsStatus") /* DeliverLogsStatus com.amazonaws.ec2#FlowLog$DeliverLogsStatus */ => {
let var_1627 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_deliver_logs_status(var_1627);
}
,
s if s.matches("flowLogId") /* FlowLogId com.amazonaws.ec2#FlowLog$FlowLogId */ => {
let var_1628 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_flow_log_id(var_1628);
}
,
s if s.matches("flowLogStatus") /* FlowLogStatus com.amazonaws.ec2#FlowLog$FlowLogStatus */ => {
let var_1629 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_flow_log_status(var_1629);
}
,
s if s.matches("logGroupName") /* LogGroupName com.amazonaws.ec2#FlowLog$LogGroupName */ => {
let var_1630 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_log_group_name(var_1630);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#FlowLog$ResourceId */ => {
let var_1631 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_1631);
}
,
s if s.matches("trafficType") /* TrafficType com.amazonaws.ec2#FlowLog$TrafficType */ => {
let var_1632 =
Some(
Result::<crate::model::TrafficType, smithy_xml::decode::XmlError>::Ok(
crate::model::TrafficType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_traffic_type(var_1632);
}
,
s if s.matches("logDestinationType") /* LogDestinationType com.amazonaws.ec2#FlowLog$LogDestinationType */ => {
let var_1633 =
Some(
Result::<crate::model::LogDestinationType, smithy_xml::decode::XmlError>::Ok(
crate::model::LogDestinationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_log_destination_type(var_1633);
}
,
s if s.matches("logDestination") /* LogDestination com.amazonaws.ec2#FlowLog$LogDestination */ => {
let var_1634 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_log_destination(var_1634);
}
,
s if s.matches("logFormat") /* LogFormat com.amazonaws.ec2#FlowLog$LogFormat */ => {
let var_1635 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_log_format(var_1635);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#FlowLog$Tags */ => {
let var_1636 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1636);
}
,
s if s.matches("maxAggregationInterval") /* MaxAggregationInterval com.amazonaws.ec2#FlowLog$MaxAggregationInterval */ => {
let var_1637 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_max_aggregation_interval(var_1637);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_load_permission_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LoadPermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LoadPermissionList$member */ => {
out.push(
crate::xml_deser::deser_structure_load_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_fpga_image(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaImage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaImage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgaImageId") /* FpgaImageId com.amazonaws.ec2#FpgaImage$FpgaImageId */ => {
let var_1638 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_id(var_1638);
}
,
s if s.matches("fpgaImageGlobalId") /* FpgaImageGlobalId com.amazonaws.ec2#FpgaImage$FpgaImageGlobalId */ => {
let var_1639 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_fpga_image_global_id(var_1639);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#FpgaImage$Name */ => {
let var_1640 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_1640);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#FpgaImage$Description */ => {
let var_1641 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1641);
}
,
s if s.matches("shellVersion") /* ShellVersion com.amazonaws.ec2#FpgaImage$ShellVersion */ => {
let var_1642 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_shell_version(var_1642);
}
,
s if s.matches("pciId") /* PciId com.amazonaws.ec2#FpgaImage$PciId */ => {
let var_1643 =
Some(
crate::xml_deser::deser_structure_pci_id(&mut tag)
?
)
;
builder = builder.set_pci_id(var_1643);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#FpgaImage$State */ => {
let var_1644 =
Some(
crate::xml_deser::deser_structure_fpga_image_state(&mut tag)
?
)
;
builder = builder.set_state(var_1644);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#FpgaImage$CreateTime */ => {
let var_1645 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_1645);
}
,
s if s.matches("updateTime") /* UpdateTime com.amazonaws.ec2#FpgaImage$UpdateTime */ => {
let var_1646 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_update_time(var_1646);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#FpgaImage$OwnerId */ => {
let var_1647 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1647);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#FpgaImage$OwnerAlias */ => {
let var_1648 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_1648);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#FpgaImage$ProductCodes */ => {
let var_1649 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_1649);
}
,
s if s.matches("tags") /* Tags com.amazonaws.ec2#FpgaImage$Tags */ => {
let var_1650 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1650);
}
,
s if s.matches("public") /* Public com.amazonaws.ec2#FpgaImage$Public */ => {
let var_1651 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_public(var_1651);
}
,
s if s.matches("dataRetentionSupport") /* DataRetentionSupport com.amazonaws.ec2#FpgaImage$DataRetentionSupport */ => {
let var_1652 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_data_retention_support(var_1652);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_host_offering(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostOffering, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostOffering::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#HostOffering$CurrencyCode */ => {
let var_1653 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_1653);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#HostOffering$Duration */ => {
let var_1654 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_duration(var_1654);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#HostOffering$HourlyPrice */ => {
let var_1655 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_1655);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostOffering$InstanceFamily */ => {
let var_1656 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_family(var_1656);
}
,
s if s.matches("offeringId") /* OfferingId com.amazonaws.ec2#HostOffering$OfferingId */ => {
let var_1657 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_offering_id(var_1657);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#HostOffering$PaymentOption */ => {
let var_1658 =
Some(
Result::<crate::model::PaymentOption, smithy_xml::decode::XmlError>::Ok(
crate::model::PaymentOption::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_payment_option(var_1658);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#HostOffering$UpfrontPrice */ => {
let var_1659 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upfront_price(var_1659);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_host_reservation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostReservation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostReservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("count") /* Count com.amazonaws.ec2#HostReservation$Count */ => {
let var_1660 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_count(var_1660);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#HostReservation$CurrencyCode */ => {
let var_1661 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_1661);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#HostReservation$Duration */ => {
let var_1662 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_duration(var_1662);
}
,
s if s.matches("end") /* End com.amazonaws.ec2#HostReservation$End */ => {
let var_1663 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end(var_1663);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#HostReservation$HostIdSet */ => {
let var_1664 =
Some(
crate::xml_deser::deser_list_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_1664);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#HostReservation$HostReservationId */ => {
let var_1665 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_reservation_id(var_1665);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#HostReservation$HourlyPrice */ => {
let var_1666 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_1666);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostReservation$InstanceFamily */ => {
let var_1667 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_family(var_1667);
}
,
s if s.matches("offeringId") /* OfferingId com.amazonaws.ec2#HostReservation$OfferingId */ => {
let var_1668 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_offering_id(var_1668);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#HostReservation$PaymentOption */ => {
let var_1669 =
Some(
Result::<crate::model::PaymentOption, smithy_xml::decode::XmlError>::Ok(
crate::model::PaymentOption::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_payment_option(var_1669);
}
,
s if s.matches("start") /* Start com.amazonaws.ec2#HostReservation$Start */ => {
let var_1670 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start(var_1670);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#HostReservation$State */ => {
let var_1671 =
Some(
Result::<crate::model::ReservationState, smithy_xml::decode::XmlError>::Ok(
crate::model::ReservationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1671);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#HostReservation$UpfrontPrice */ => {
let var_1672 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upfront_price(var_1672);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#HostReservation$Tags */ => {
let var_1673 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1673);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_host(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Host, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Host::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("autoPlacement") /* AutoPlacement com.amazonaws.ec2#Host$AutoPlacement */ => {
let var_1674 =
Some(
Result::<crate::model::AutoPlacement, smithy_xml::decode::XmlError>::Ok(
crate::model::AutoPlacement::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_auto_placement(var_1674);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Host$AvailabilityZone */ => {
let var_1675 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1675);
}
,
s if s.matches("availableCapacity") /* AvailableCapacity com.amazonaws.ec2#Host$AvailableCapacity */ => {
let var_1676 =
Some(
crate::xml_deser::deser_structure_available_capacity(&mut tag)
?
)
;
builder = builder.set_available_capacity(var_1676);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#Host$ClientToken */ => {
let var_1677 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_1677);
}
,
s if s.matches("hostId") /* HostId com.amazonaws.ec2#Host$HostId */ => {
let var_1678 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_id(var_1678);
}
,
s if s.matches("hostProperties") /* HostProperties com.amazonaws.ec2#Host$HostProperties */ => {
let var_1679 =
Some(
crate::xml_deser::deser_structure_host_properties(&mut tag)
?
)
;
builder = builder.set_host_properties(var_1679);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Host$HostReservationId */ => {
let var_1680 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_reservation_id(var_1680);
}
,
s if s.matches("instances") /* Instances com.amazonaws.ec2#Host$Instances */ => {
let var_1681 =
Some(
crate::xml_deser::deser_list_host_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_1681);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Host$State */ => {
let var_1682 =
Some(
Result::<crate::model::AllocationState, smithy_xml::decode::XmlError>::Ok(
crate::model::AllocationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1682);
}
,
s if s.matches("allocationTime") /* AllocationTime com.amazonaws.ec2#Host$AllocationTime */ => {
let var_1683 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_allocation_time(var_1683);
}
,
s if s.matches("releaseTime") /* ReleaseTime com.amazonaws.ec2#Host$ReleaseTime */ => {
let var_1684 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_release_time(var_1684);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Host$Tags */ => {
let var_1685 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1685);
}
,
s if s.matches("hostRecovery") /* HostRecovery com.amazonaws.ec2#Host$HostRecovery */ => {
let var_1686 =
Some(
Result::<crate::model::HostRecovery, smithy_xml::decode::XmlError>::Ok(
crate::model::HostRecovery::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_host_recovery(var_1686);
}
,
s if s.matches("allowsMultipleInstanceTypes") /* AllowsMultipleInstanceTypes com.amazonaws.ec2#Host$AllowsMultipleInstanceTypes */ => {
let var_1687 =
Some(
Result::<crate::model::AllowsMultipleInstanceTypes, smithy_xml::decode::XmlError>::Ok(
crate::model::AllowsMultipleInstanceTypes::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allows_multiple_instance_types(var_1687);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Host$OwnerId */ => {
let var_1688 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1688);
}
,
s if s.matches("availabilityZoneId") /* AvailabilityZoneId com.amazonaws.ec2#Host$AvailabilityZoneId */ => {
let var_1689 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_id(var_1689);
}
,
s if s.matches("memberOfServiceLinkedResourceGroup") /* MemberOfServiceLinkedResourceGroup com.amazonaws.ec2#Host$MemberOfServiceLinkedResourceGroup */ => {
let var_1690 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_member_of_service_linked_resource_group(var_1690);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_block_device_mapping(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::BlockDeviceMapping, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::BlockDeviceMapping::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#BlockDeviceMapping$DeviceName */ => {
let var_1691 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_name(var_1691);
}
,
s if s.matches("virtualName") /* VirtualName com.amazonaws.ec2#BlockDeviceMapping$VirtualName */ => {
let var_1692 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_virtual_name(var_1692);
}
,
s if s.matches("ebs") /* Ebs com.amazonaws.ec2#BlockDeviceMapping$Ebs */ => {
let var_1693 =
Some(
crate::xml_deser::deser_structure_ebs_block_device(&mut tag)
?
)
;
builder = builder.set_ebs(var_1693);
}
,
s if s.matches("noDevice") /* NoDevice com.amazonaws.ec2#BlockDeviceMapping$NoDevice */ => {
let var_1694 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_no_device(var_1694);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchPermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("group") /* Group com.amazonaws.ec2#LaunchPermission$Group */ => {
let var_1695 =
Some(
Result::<crate::model::PermissionGroup, smithy_xml::decode::XmlError>::Ok(
crate::model::PermissionGroup::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_group(var_1695);
}
,
s if s.matches("userId") /* UserId com.amazonaws.ec2#LaunchPermission$UserId */ => {
let var_1696 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_id(var_1696);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_product_code(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProductCode, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProductCode::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("productCode") /* ProductCodeId com.amazonaws.ec2#ProductCode$ProductCodeId */ => {
let var_1697 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_product_code_id(var_1697);
}
,
s if s.matches("type") /* ProductCodeType com.amazonaws.ec2#ProductCode$ProductCodeType */ => {
let var_1698 =
Some(
Result::<crate::model::ProductCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::ProductCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_code_type(var_1698);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_image(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Image, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Image::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("architecture") /* Architecture com.amazonaws.ec2#Image$Architecture */ => {
let var_1699 =
Some(
Result::<crate::model::ArchitectureValues, smithy_xml::decode::XmlError>::Ok(
crate::model::ArchitectureValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_architecture(var_1699);
}
,
s if s.matches("creationDate") /* CreationDate com.amazonaws.ec2#Image$CreationDate */ => {
let var_1700 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_creation_date(var_1700);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#Image$ImageId */ => {
let var_1701 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_1701);
}
,
s if s.matches("imageLocation") /* ImageLocation com.amazonaws.ec2#Image$ImageLocation */ => {
let var_1702 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_location(var_1702);
}
,
s if s.matches("imageType") /* ImageType com.amazonaws.ec2#Image$ImageType */ => {
let var_1703 =
Some(
Result::<crate::model::ImageTypeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::ImageTypeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_image_type(var_1703);
}
,
s if s.matches("isPublic") /* Public com.amazonaws.ec2#Image$Public */ => {
let var_1704 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_public(var_1704);
}
,
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#Image$KernelId */ => {
let var_1705 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kernel_id(var_1705);
}
,
s if s.matches("imageOwnerId") /* OwnerId com.amazonaws.ec2#Image$OwnerId */ => {
let var_1706 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1706);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#Image$Platform */ => {
let var_1707 =
Some(
Result::<crate::model::PlatformValues, smithy_xml::decode::XmlError>::Ok(
crate::model::PlatformValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_platform(var_1707);
}
,
s if s.matches("platformDetails") /* PlatformDetails com.amazonaws.ec2#Image$PlatformDetails */ => {
let var_1708 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform_details(var_1708);
}
,
s if s.matches("usageOperation") /* UsageOperation com.amazonaws.ec2#Image$UsageOperation */ => {
let var_1709 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_usage_operation(var_1709);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#Image$ProductCodes */ => {
let var_1710 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_1710);
}
,
s if s.matches("ramdiskId") /* RamdiskId com.amazonaws.ec2#Image$RamdiskId */ => {
let var_1711 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ramdisk_id(var_1711);
}
,
s if s.matches("imageState") /* State com.amazonaws.ec2#Image$State */ => {
let var_1712 =
Some(
Result::<crate::model::ImageState, smithy_xml::decode::XmlError>::Ok(
crate::model::ImageState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1712);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#Image$BlockDeviceMappings */ => {
let var_1713 =
Some(
crate::xml_deser::deser_list_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_1713);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#Image$Description */ => {
let var_1714 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1714);
}
,
s if s.matches("enaSupport") /* EnaSupport com.amazonaws.ec2#Image$EnaSupport */ => {
let var_1715 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ena_support(var_1715);
}
,
s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#Image$Hypervisor */ => {
let var_1716 =
Some(
Result::<crate::model::HypervisorType, smithy_xml::decode::XmlError>::Ok(
crate::model::HypervisorType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_hypervisor(var_1716);
}
,
s if s.matches("imageOwnerAlias") /* ImageOwnerAlias com.amazonaws.ec2#Image$ImageOwnerAlias */ => {
let var_1717 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_owner_alias(var_1717);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#Image$Name */ => {
let var_1718 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_1718);
}
,
s if s.matches("rootDeviceName") /* RootDeviceName com.amazonaws.ec2#Image$RootDeviceName */ => {
let var_1719 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_root_device_name(var_1719);
}
,
s if s.matches("rootDeviceType") /* RootDeviceType com.amazonaws.ec2#Image$RootDeviceType */ => {
let var_1720 =
Some(
Result::<crate::model::DeviceType, smithy_xml::decode::XmlError>::Ok(
crate::model::DeviceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_root_device_type(var_1720);
}
,
s if s.matches("sriovNetSupport") /* SriovNetSupport com.amazonaws.ec2#Image$SriovNetSupport */ => {
let var_1721 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_sriov_net_support(var_1721);
}
,
s if s.matches("stateReason") /* StateReason com.amazonaws.ec2#Image$StateReason */ => {
let var_1722 =
Some(
crate::xml_deser::deser_structure_state_reason(&mut tag)
?
)
;
builder = builder.set_state_reason(var_1722);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Image$Tags */ => {
let var_1723 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1723);
}
,
s if s.matches("virtualizationType") /* VirtualizationType com.amazonaws.ec2#Image$VirtualizationType */ => {
let var_1724 =
Some(
Result::<crate::model::VirtualizationType, smithy_xml::decode::XmlError>::Ok(
crate::model::VirtualizationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_virtualization_type(var_1724);
}
,
s if s.matches("bootMode") /* BootMode com.amazonaws.ec2#Image$BootMode */ => {
let var_1725 =
Some(
Result::<crate::model::BootModeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::BootModeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_boot_mode(var_1725);
}
,
s if s.matches("deprecationTime") /* DeprecationTime com.amazonaws.ec2#Image$DeprecationTime */ => {
let var_1726 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_deprecation_time(var_1726);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_import_image_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportImageTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportImageTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("architecture") /* Architecture com.amazonaws.ec2#ImportImageTask$Architecture */ => {
let var_1727 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_architecture(var_1727);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ImportImageTask$Description */ => {
let var_1728 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1728);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#ImportImageTask$Encrypted */ => {
let var_1729 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_1729);
}
,
s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#ImportImageTask$Hypervisor */ => {
let var_1730 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hypervisor(var_1730);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#ImportImageTask$ImageId */ => {
let var_1731 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_1731);
}
,
s if s.matches("importTaskId") /* ImportTaskId com.amazonaws.ec2#ImportImageTask$ImportTaskId */ => {
let var_1732 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_task_id(var_1732);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#ImportImageTask$KmsKeyId */ => {
let var_1733 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_1733);
}
,
s if s.matches("licenseType") /* LicenseType com.amazonaws.ec2#ImportImageTask$LicenseType */ => {
let var_1734 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_license_type(var_1734);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ImportImageTask$Platform */ => {
let var_1735 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_1735);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#ImportImageTask$Progress */ => {
let var_1736 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_1736);
}
,
s if s.matches("snapshotDetailSet") /* SnapshotDetails com.amazonaws.ec2#ImportImageTask$SnapshotDetails */ => {
let var_1737 =
Some(
crate::xml_deser::deser_list_snapshot_detail_list(&mut tag)
?
)
;
builder = builder.set_snapshot_details(var_1737);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ImportImageTask$Status */ => {
let var_1738 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_1738);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ImportImageTask$StatusMessage */ => {
let var_1739 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1739);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ImportImageTask$Tags */ => {
let var_1740 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1740);
}
,
s if s.matches("licenseSpecifications") /* LicenseSpecifications com.amazonaws.ec2#ImportImageTask$LicenseSpecifications */ => {
let var_1741 =
Some(
crate::xml_deser::deser_list_import_image_license_specification_list_response(&mut tag)
?
)
;
builder = builder.set_license_specifications(var_1741);
}
,
s if s.matches("usageOperation") /* UsageOperation com.amazonaws.ec2#ImportImageTask$UsageOperation */ => {
let var_1742 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_usage_operation(var_1742);
}
,
s if s.matches("bootMode") /* BootMode com.amazonaws.ec2#ImportImageTask$BootMode */ => {
let var_1743 =
Some(
Result::<crate::model::BootModeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::BootModeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_boot_mode(var_1743);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_import_snapshot_task(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportSnapshotTask, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportSnapshotTask::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ImportSnapshotTask$Description */ => {
let var_1744 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1744);
}
,
s if s.matches("importTaskId") /* ImportTaskId com.amazonaws.ec2#ImportSnapshotTask$ImportTaskId */ => {
let var_1745 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_task_id(var_1745);
}
,
s if s.matches("snapshotTaskDetail") /* SnapshotTaskDetail com.amazonaws.ec2#ImportSnapshotTask$SnapshotTaskDetail */ => {
let var_1746 =
Some(
crate::xml_deser::deser_structure_snapshot_task_detail(&mut tag)
?
)
;
builder = builder.set_snapshot_task_detail(var_1746);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ImportSnapshotTask$Tags */ => {
let var_1747 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1747);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_group_identifier(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GroupIdentifier, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::GroupIdentifier::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#GroupIdentifier$GroupName */ => {
let var_1748 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_1748);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#GroupIdentifier$GroupId */ => {
let var_1749 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1749);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_block_device_mapping(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceBlockDeviceMapping, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceBlockDeviceMapping::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#InstanceBlockDeviceMapping$DeviceName */ => {
let var_1750 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_name(var_1750);
}
,
s if s.matches("ebs") /* Ebs com.amazonaws.ec2#InstanceBlockDeviceMapping$Ebs */ => {
let var_1751 =
Some(
crate::xml_deser::deser_structure_ebs_instance_block_device(&mut tag)
?
)
;
builder = builder.set_ebs(var_1751);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_credit_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceCreditSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceCreditSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceCreditSpecification$InstanceId */ => {
let var_1752 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1752);
}
,
s if s.matches("cpuCredits") /* CpuCredits com.amazonaws.ec2#InstanceCreditSpecification$CpuCredits */ => {
let var_1753 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cpu_credits(var_1753);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reservation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Reservation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#Reservation$Groups */ => {
let var_1754 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_1754);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_1755 =
Some(
crate::xml_deser::deser_list_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_1755);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_1756 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1756);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_1757 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_requester_id(var_1757);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_1758 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reservation_id(var_1758);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#InstanceStatus$AvailabilityZone */ => {
let var_1759 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1759);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#InstanceStatus$OutpostArn */ => {
let var_1760 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1760);
}
,
s if s.matches("eventsSet") /* Events com.amazonaws.ec2#InstanceStatus$Events */ => {
let var_1761 =
Some(
crate::xml_deser::deser_list_instance_status_event_list(&mut tag)
?
)
;
builder = builder.set_events(var_1761);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceStatus$InstanceId */ => {
let var_1762 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1762);
}
,
s if s.matches("instanceState") /* InstanceState com.amazonaws.ec2#InstanceStatus$InstanceState */ => {
let var_1763 =
Some(
crate::xml_deser::deser_structure_instance_state(&mut tag)
?
)
;
builder = builder.set_instance_state(var_1763);
}
,
s if s.matches("instanceStatus") /* InstanceStatus com.amazonaws.ec2#InstanceStatus$InstanceStatus */ => {
let var_1764 =
Some(
crate::xml_deser::deser_structure_instance_status_summary(&mut tag)
?
)
;
builder = builder.set_instance_status(var_1764);
}
,
s if s.matches("systemStatus") /* SystemStatus com.amazonaws.ec2#InstanceStatus$SystemStatus */ => {
let var_1765 =
Some(
crate::xml_deser::deser_structure_instance_status_summary(&mut tag)
?
)
;
builder = builder.set_system_status(var_1765);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_type_offering(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceTypeOffering, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceTypeOffering::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#InstanceTypeOffering$InstanceType */ => {
let var_1766 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1766);
}
,
s if s.matches("locationType") /* LocationType com.amazonaws.ec2#InstanceTypeOffering$LocationType */ => {
let var_1767 =
Some(
Result::<crate::model::LocationType, smithy_xml::decode::XmlError>::Ok(
crate::model::LocationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_location_type(var_1767);
}
,
s if s.matches("location") /* Location com.amazonaws.ec2#InstanceTypeOffering$Location */ => {
let var_1768 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_location(var_1768);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_type_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceTypeInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceTypeInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#InstanceTypeInfo$InstanceType */ => {
let var_1769 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1769);
}
,
s if s.matches("currentGeneration") /* CurrentGeneration com.amazonaws.ec2#InstanceTypeInfo$CurrentGeneration */ => {
let var_1770 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#CurrentGenerationFlag`)"))
}
?
)
;
builder = builder.set_current_generation(var_1770);
}
,
s if s.matches("freeTierEligible") /* FreeTierEligible com.amazonaws.ec2#InstanceTypeInfo$FreeTierEligible */ => {
let var_1771 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#FreeTierEligibleFlag`)"))
}
?
)
;
builder = builder.set_free_tier_eligible(var_1771);
}
,
s if s.matches("supportedUsageClasses") /* SupportedUsageClasses com.amazonaws.ec2#InstanceTypeInfo$SupportedUsageClasses */ => {
let var_1772 =
Some(
crate::xml_deser::deser_list_usage_class_type_list(&mut tag)
?
)
;
builder = builder.set_supported_usage_classes(var_1772);
}
,
s if s.matches("supportedRootDeviceTypes") /* SupportedRootDeviceTypes com.amazonaws.ec2#InstanceTypeInfo$SupportedRootDeviceTypes */ => {
let var_1773 =
Some(
crate::xml_deser::deser_list_root_device_type_list(&mut tag)
?
)
;
builder = builder.set_supported_root_device_types(var_1773);
}
,
s if s.matches("supportedVirtualizationTypes") /* SupportedVirtualizationTypes com.amazonaws.ec2#InstanceTypeInfo$SupportedVirtualizationTypes */ => {
let var_1774 =
Some(
crate::xml_deser::deser_list_virtualization_type_list(&mut tag)
?
)
;
builder = builder.set_supported_virtualization_types(var_1774);
}
,
s if s.matches("bareMetal") /* BareMetal com.amazonaws.ec2#InstanceTypeInfo$BareMetal */ => {
let var_1775 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#BareMetalFlag`)"))
}
?
)
;
builder = builder.set_bare_metal(var_1775);
}
,
s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#InstanceTypeInfo$Hypervisor */ => {
let var_1776 =
Some(
Result::<crate::model::InstanceTypeHypervisor, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceTypeHypervisor::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_hypervisor(var_1776);
}
,
s if s.matches("processorInfo") /* ProcessorInfo com.amazonaws.ec2#InstanceTypeInfo$ProcessorInfo */ => {
let var_1777 =
Some(
crate::xml_deser::deser_structure_processor_info(&mut tag)
?
)
;
builder = builder.set_processor_info(var_1777);
}
,
s if s.matches("vCpuInfo") /* VCpuInfo com.amazonaws.ec2#InstanceTypeInfo$VCpuInfo */ => {
let var_1778 =
Some(
crate::xml_deser::deser_structure_v_cpu_info(&mut tag)
?
)
;
builder = builder.set_v_cpu_info(var_1778);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#InstanceTypeInfo$MemoryInfo */ => {
let var_1779 =
Some(
crate::xml_deser::deser_structure_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_1779);
}
,
s if s.matches("instanceStorageSupported") /* InstanceStorageSupported com.amazonaws.ec2#InstanceTypeInfo$InstanceStorageSupported */ => {
let var_1780 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#InstanceStorageFlag`)"))
}
?
)
;
builder = builder.set_instance_storage_supported(var_1780);
}
,
s if s.matches("instanceStorageInfo") /* InstanceStorageInfo com.amazonaws.ec2#InstanceTypeInfo$InstanceStorageInfo */ => {
let var_1781 =
Some(
crate::xml_deser::deser_structure_instance_storage_info(&mut tag)
?
)
;
builder = builder.set_instance_storage_info(var_1781);
}
,
s if s.matches("ebsInfo") /* EbsInfo com.amazonaws.ec2#InstanceTypeInfo$EbsInfo */ => {
let var_1782 =
Some(
crate::xml_deser::deser_structure_ebs_info(&mut tag)
?
)
;
builder = builder.set_ebs_info(var_1782);
}
,
s if s.matches("networkInfo") /* NetworkInfo com.amazonaws.ec2#InstanceTypeInfo$NetworkInfo */ => {
let var_1783 =
Some(
crate::xml_deser::deser_structure_network_info(&mut tag)
?
)
;
builder = builder.set_network_info(var_1783);
}
,
s if s.matches("gpuInfo") /* GpuInfo com.amazonaws.ec2#InstanceTypeInfo$GpuInfo */ => {
let var_1784 =
Some(
crate::xml_deser::deser_structure_gpu_info(&mut tag)
?
)
;
builder = builder.set_gpu_info(var_1784);
}
,
s if s.matches("fpgaInfo") /* FpgaInfo com.amazonaws.ec2#InstanceTypeInfo$FpgaInfo */ => {
let var_1785 =
Some(
crate::xml_deser::deser_structure_fpga_info(&mut tag)
?
)
;
builder = builder.set_fpga_info(var_1785);
}
,
s if s.matches("placementGroupInfo") /* PlacementGroupInfo com.amazonaws.ec2#InstanceTypeInfo$PlacementGroupInfo */ => {
let var_1786 =
Some(
crate::xml_deser::deser_structure_placement_group_info(&mut tag)
?
)
;
builder = builder.set_placement_group_info(var_1786);
}
,
s if s.matches("inferenceAcceleratorInfo") /* InferenceAcceleratorInfo com.amazonaws.ec2#InstanceTypeInfo$InferenceAcceleratorInfo */ => {
let var_1787 =
Some(
crate::xml_deser::deser_structure_inference_accelerator_info(&mut tag)
?
)
;
builder = builder.set_inference_accelerator_info(var_1787);
}
,
s if s.matches("hibernationSupported") /* HibernationSupported com.amazonaws.ec2#InstanceTypeInfo$HibernationSupported */ => {
let var_1788 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#HibernationFlag`)"))
}
?
)
;
builder = builder.set_hibernation_supported(var_1788);
}
,
s if s.matches("burstablePerformanceSupported") /* BurstablePerformanceSupported com.amazonaws.ec2#InstanceTypeInfo$BurstablePerformanceSupported */ => {
let var_1789 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#BurstablePerformanceFlag`)"))
}
?
)
;
builder = builder.set_burstable_performance_supported(var_1789);
}
,
s if s.matches("dedicatedHostsSupported") /* DedicatedHostsSupported com.amazonaws.ec2#InstanceTypeInfo$DedicatedHostsSupported */ => {
let var_1790 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#DedicatedHostFlag`)"))
}
?
)
;
builder = builder.set_dedicated_hosts_supported(var_1790);
}
,
s if s.matches("autoRecoverySupported") /* AutoRecoverySupported com.amazonaws.ec2#InstanceTypeInfo$AutoRecoverySupported */ => {
let var_1791 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#AutoRecoveryFlag`)"))
}
?
)
;
builder = builder.set_auto_recovery_supported(var_1791);
}
,
s if s.matches("supportedBootModes") /* SupportedBootModes com.amazonaws.ec2#InstanceTypeInfo$SupportedBootModes */ => {
let var_1792 =
Some(
crate::xml_deser::deser_list_boot_mode_type_list(&mut tag)
?
)
;
builder = builder.set_supported_boot_modes(var_1792);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_pool(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6Pool, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6Pool::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("poolId") /* PoolId com.amazonaws.ec2#Ipv6Pool$PoolId */ => {
let var_1793 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_pool_id(var_1793);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#Ipv6Pool$Description */ => {
let var_1794 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1794);
}
,
s if s.matches("poolCidrBlockSet") /* PoolCidrBlocks com.amazonaws.ec2#Ipv6Pool$PoolCidrBlocks */ => {
let var_1795 =
Some(
crate::xml_deser::deser_list_pool_cidr_blocks_set(&mut tag)
?
)
;
builder = builder.set_pool_cidr_blocks(var_1795);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Ipv6Pool$Tags */ => {
let var_1796 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1796);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_key_pair_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::KeyPairInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::KeyPairInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("keyPairId") /* KeyPairId com.amazonaws.ec2#KeyPairInfo$KeyPairId */ => {
let var_1797 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_pair_id(var_1797);
}
,
s if s.matches("keyFingerprint") /* KeyFingerprint com.amazonaws.ec2#KeyPairInfo$KeyFingerprint */ => {
let var_1798 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_fingerprint(var_1798);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#KeyPairInfo$KeyName */ => {
let var_1799 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_1799);
}
,
s if s.matches("keyType") /* KeyType com.amazonaws.ec2#KeyPairInfo$KeyType */ => {
let var_1800 =
Some(
Result::<crate::model::KeyType, smithy_xml::decode::XmlError>::Ok(
crate::model::KeyType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_key_type(var_1800);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#KeyPairInfo$Tags */ => {
let var_1801 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1801);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_route_table(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGatewayRouteTable, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGatewayRouteTable::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#LocalGatewayRouteTable$LocalGatewayRouteTableId */ => {
let var_1802 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_1802);
}
,
s if s.matches("localGatewayRouteTableArn") /* LocalGatewayRouteTableArn com.amazonaws.ec2#LocalGatewayRouteTable$LocalGatewayRouteTableArn */ => {
let var_1803 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_arn(var_1803);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGatewayRouteTable$LocalGatewayId */ => {
let var_1804 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_1804);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#LocalGatewayRouteTable$OutpostArn */ => {
let var_1805 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1805);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayRouteTable$OwnerId */ => {
let var_1806 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1806);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#LocalGatewayRouteTable$State */ => {
let var_1807 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_1807);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGatewayRouteTable$Tags */ => {
let var_1808 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1808);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_route_table_virtual_interface_group_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder =
crate::model::LocalGatewayRouteTableVirtualInterfaceGroupAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayRouteTableVirtualInterfaceGroupAssociationId") /* LocalGatewayRouteTableVirtualInterfaceGroupAssociationId com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$LocalGatewayRouteTableVirtualInterfaceGroupAssociationId */ => {
let var_1809 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_virtual_interface_group_association_id(var_1809);
}
,
s if s.matches("localGatewayVirtualInterfaceGroupId") /* LocalGatewayVirtualInterfaceGroupId com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$LocalGatewayVirtualInterfaceGroupId */ => {
let var_1810 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_virtual_interface_group_id(var_1810);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$LocalGatewayId */ => {
let var_1811 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_1811);
}
,
s if s.matches("localGatewayRouteTableId") /* LocalGatewayRouteTableId com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$LocalGatewayRouteTableId */ => {
let var_1812 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_id(var_1812);
}
,
s if s.matches("localGatewayRouteTableArn") /* LocalGatewayRouteTableArn com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$LocalGatewayRouteTableArn */ => {
let var_1813 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_route_table_arn(var_1813);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$OwnerId */ => {
let var_1814 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1814);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$State */ => {
let var_1815 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_1815);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGatewayRouteTableVirtualInterfaceGroupAssociation$Tags */ => {
let var_1816 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1816);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGateway, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGateway::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGateway$LocalGatewayId */ => {
let var_1817 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_1817);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#LocalGateway$OutpostArn */ => {
let var_1818 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1818);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGateway$OwnerId */ => {
let var_1819 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1819);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#LocalGateway$State */ => {
let var_1820 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_1820);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGateway$Tags */ => {
let var_1821 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1821);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_virtual_interface_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGatewayVirtualInterfaceGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGatewayVirtualInterfaceGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayVirtualInterfaceGroupId") /* LocalGatewayVirtualInterfaceGroupId com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroup$LocalGatewayVirtualInterfaceGroupId */ => {
let var_1822 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_virtual_interface_group_id(var_1822);
}
,
s if s.matches("localGatewayVirtualInterfaceIdSet") /* LocalGatewayVirtualInterfaceIds com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroup$LocalGatewayVirtualInterfaceIds */ => {
let var_1823 =
Some(
crate::xml_deser::deser_list_local_gateway_virtual_interface_id_set(&mut tag)
?
)
;
builder = builder.set_local_gateway_virtual_interface_ids(var_1823);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroup$LocalGatewayId */ => {
let var_1824 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_1824);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroup$OwnerId */ => {
let var_1825 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1825);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGatewayVirtualInterfaceGroup$Tags */ => {
let var_1826 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1826);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_local_gateway_virtual_interface(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LocalGatewayVirtualInterface, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LocalGatewayVirtualInterface::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("localGatewayVirtualInterfaceId") /* LocalGatewayVirtualInterfaceId com.amazonaws.ec2#LocalGatewayVirtualInterface$LocalGatewayVirtualInterfaceId */ => {
let var_1827 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_virtual_interface_id(var_1827);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#LocalGatewayVirtualInterface$LocalGatewayId */ => {
let var_1828 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_1828);
}
,
s if s.matches("vlan") /* Vlan com.amazonaws.ec2#LocalGatewayVirtualInterface$Vlan */ => {
let var_1829 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_vlan(var_1829);
}
,
s if s.matches("localAddress") /* LocalAddress com.amazonaws.ec2#LocalGatewayVirtualInterface$LocalAddress */ => {
let var_1830 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_address(var_1830);
}
,
s if s.matches("peerAddress") /* PeerAddress com.amazonaws.ec2#LocalGatewayVirtualInterface$PeerAddress */ => {
let var_1831 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_peer_address(var_1831);
}
,
s if s.matches("localBgpAsn") /* LocalBgpAsn com.amazonaws.ec2#LocalGatewayVirtualInterface$LocalBgpAsn */ => {
let var_1832 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_local_bgp_asn(var_1832);
}
,
s if s.matches("peerBgpAsn") /* PeerBgpAsn com.amazonaws.ec2#LocalGatewayVirtualInterface$PeerBgpAsn */ => {
let var_1833 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_peer_bgp_asn(var_1833);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#LocalGatewayVirtualInterface$OwnerId */ => {
let var_1834 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1834);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LocalGatewayVirtualInterface$Tags */ => {
let var_1835 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1835);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_moving_address_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MovingAddressStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::MovingAddressStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("moveStatus") /* MoveStatus com.amazonaws.ec2#MovingAddressStatus$MoveStatus */ => {
let var_1836 =
Some(
Result::<crate::model::MoveStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::MoveStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_move_status(var_1836);
}
,
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#MovingAddressStatus$PublicIp */ => {
let var_1837 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_1837);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrefixList, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrefixList::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrSet") /* Cidrs com.amazonaws.ec2#PrefixList$Cidrs */ => {
let var_1838 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_cidrs(var_1838);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#PrefixList$PrefixListId */ => {
let var_1839 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_1839);
}
,
s if s.matches("prefixListName") /* PrefixListName com.amazonaws.ec2#PrefixList$PrefixListName */ => {
let var_1840 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_name(var_1840);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_principal_id_format(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrincipalIdFormat, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrincipalIdFormat::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("arn") /* Arn com.amazonaws.ec2#PrincipalIdFormat$Arn */ => {
let var_1841 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_1841);
}
,
s if s.matches("statusSet") /* Statuses com.amazonaws.ec2#PrincipalIdFormat$Statuses */ => {
let var_1842 =
Some(
crate::xml_deser::deser_list_id_format_list(&mut tag)
?
)
;
builder = builder.set_statuses(var_1842);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_public_ipv4_pool(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4Pool, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4Pool::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("poolId") /* PoolId com.amazonaws.ec2#PublicIpv4Pool$PoolId */ => {
let var_1843 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_pool_id(var_1843);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#PublicIpv4Pool$Description */ => {
let var_1844 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1844);
}
,
s if s.matches("poolAddressRangeSet") /* PoolAddressRanges com.amazonaws.ec2#PublicIpv4Pool$PoolAddressRanges */ => {
let var_1845 =
Some(
crate::xml_deser::deser_list_public_ipv4_pool_range_set(&mut tag)
?
)
;
builder = builder.set_pool_address_ranges(var_1845);
}
,
s if s.matches("totalAddressCount") /* TotalAddressCount com.amazonaws.ec2#PublicIpv4Pool$TotalAddressCount */ => {
let var_1846 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_address_count(var_1846);
}
,
s if s.matches("totalAvailableAddressCount") /* TotalAvailableAddressCount com.amazonaws.ec2#PublicIpv4Pool$TotalAvailableAddressCount */ => {
let var_1847 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_available_address_count(var_1847);
}
,
s if s.matches("networkBorderGroup") /* NetworkBorderGroup com.amazonaws.ec2#PublicIpv4Pool$NetworkBorderGroup */ => {
let var_1848 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_border_group(var_1848);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#PublicIpv4Pool$Tags */ => {
let var_1849 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1849);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_region(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Region, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Region::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("regionEndpoint") /* Endpoint com.amazonaws.ec2#Region$Endpoint */ => {
let var_1850 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_endpoint(var_1850);
}
,
s if s.matches("regionName") /* RegionName com.amazonaws.ec2#Region$RegionName */ => {
let var_1851 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_region_name(var_1851);
}
,
s if s.matches("optInStatus") /* OptInStatus com.amazonaws.ec2#Region$OptInStatus */ => {
let var_1852 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_opt_in_status(var_1852);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstances, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstances::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ReservedInstances$AvailabilityZone */ => {
let var_1853 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1853);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#ReservedInstances$Duration */ => {
let var_1854 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_duration(var_1854);
}
,
s if s.matches("end") /* End com.amazonaws.ec2#ReservedInstances$End */ => {
let var_1855 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_end(var_1855);
}
,
s if s.matches("fixedPrice") /* FixedPrice com.amazonaws.ec2#ReservedInstances$FixedPrice */ => {
let var_1856 =
Some(
{
<f32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (float: `com.amazonaws.ec2#Float`)"))
}
?
)
;
builder = builder.set_fixed_price(var_1856);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ReservedInstances$InstanceCount */ => {
let var_1857 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_count(var_1857);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ReservedInstances$InstanceType */ => {
let var_1858 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1858);
}
,
s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#ReservedInstances$ProductDescription */ => {
let var_1859 =
Some(
Result::<crate::model::RiProductDescription, smithy_xml::decode::XmlError>::Ok(
crate::model::RiProductDescription::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_description(var_1859);
}
,
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#ReservedInstances$ReservedInstancesId */ => {
let var_1860 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_1860);
}
,
s if s.matches("start") /* Start com.amazonaws.ec2#ReservedInstances$Start */ => {
let var_1861 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start(var_1861);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#ReservedInstances$State */ => {
let var_1862 =
Some(
Result::<crate::model::ReservedInstanceState, smithy_xml::decode::XmlError>::Ok(
crate::model::ReservedInstanceState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1862);
}
,
s if s.matches("usagePrice") /* UsagePrice com.amazonaws.ec2#ReservedInstances$UsagePrice */ => {
let var_1863 =
Some(
{
<f32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (float: `com.amazonaws.ec2#Float`)"))
}
?
)
;
builder = builder.set_usage_price(var_1863);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#ReservedInstances$CurrencyCode */ => {
let var_1864 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_1864);
}
,
s if s.matches("instanceTenancy") /* InstanceTenancy com.amazonaws.ec2#ReservedInstances$InstanceTenancy */ => {
let var_1865 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_tenancy(var_1865);
}
,
s if s.matches("offeringClass") /* OfferingClass com.amazonaws.ec2#ReservedInstances$OfferingClass */ => {
let var_1866 =
Some(
Result::<crate::model::OfferingClassType, smithy_xml::decode::XmlError>::Ok(
crate::model::OfferingClassType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_offering_class(var_1866);
}
,
s if s.matches("offeringType") /* OfferingType com.amazonaws.ec2#ReservedInstances$OfferingType */ => {
let var_1867 =
Some(
Result::<crate::model::OfferingTypeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::OfferingTypeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_offering_type(var_1867);
}
,
s if s.matches("recurringCharges") /* RecurringCharges com.amazonaws.ec2#ReservedInstances$RecurringCharges */ => {
let var_1868 =
Some(
crate::xml_deser::deser_list_recurring_charges_list(&mut tag)
?
)
;
builder = builder.set_recurring_charges(var_1868);
}
,
s if s.matches("scope") /* Scope com.amazonaws.ec2#ReservedInstances$Scope */ => {
let var_1869 =
Some(
Result::<crate::model::Scope, smithy_xml::decode::XmlError>::Ok(
crate::model::Scope::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_scope(var_1869);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ReservedInstances$Tags */ => {
let var_1870 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1870);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_modification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesModification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesModification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#ReservedInstancesModification$ClientToken */ => {
let var_1871 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_1871);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ReservedInstancesModification$CreateDate */ => {
let var_1872 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1872);
}
,
s if s.matches("effectiveDate") /* EffectiveDate com.amazonaws.ec2#ReservedInstancesModification$EffectiveDate */ => {
let var_1873 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_effective_date(var_1873);
}
,
s if s.matches("modificationResultSet") /* ModificationResults com.amazonaws.ec2#ReservedInstancesModification$ModificationResults */ => {
let var_1874 =
Some(
crate::xml_deser::deser_list_reserved_instances_modification_result_list(&mut tag)
?
)
;
builder = builder.set_modification_results(var_1874);
}
,
s if s.matches("reservedInstancesSet") /* ReservedInstancesIds com.amazonaws.ec2#ReservedInstancesModification$ReservedInstancesIds */ => {
let var_1875 =
Some(
crate::xml_deser::deser_list_reserved_intances_ids(&mut tag)
?
)
;
builder = builder.set_reserved_instances_ids(var_1875);
}
,
s if s.matches("reservedInstancesModificationId") /* ReservedInstancesModificationId com.amazonaws.ec2#ReservedInstancesModification$ReservedInstancesModificationId */ => {
let var_1876 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_modification_id(var_1876);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ReservedInstancesModification$Status */ => {
let var_1877 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_1877);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ReservedInstancesModification$StatusMessage */ => {
let var_1878 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_1878);
}
,
s if s.matches("updateDate") /* UpdateDate com.amazonaws.ec2#ReservedInstancesModification$UpdateDate */ => {
let var_1879 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_update_date(var_1879);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_offering(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesOffering, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesOffering::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ReservedInstancesOffering$AvailabilityZone */ => {
let var_1880 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1880);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#ReservedInstancesOffering$Duration */ => {
let var_1881 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_duration(var_1881);
}
,
s if s.matches("fixedPrice") /* FixedPrice com.amazonaws.ec2#ReservedInstancesOffering$FixedPrice */ => {
let var_1882 =
Some(
{
<f32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (float: `com.amazonaws.ec2#Float`)"))
}
?
)
;
builder = builder.set_fixed_price(var_1882);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ReservedInstancesOffering$InstanceType */ => {
let var_1883 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1883);
}
,
s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#ReservedInstancesOffering$ProductDescription */ => {
let var_1884 =
Some(
Result::<crate::model::RiProductDescription, smithy_xml::decode::XmlError>::Ok(
crate::model::RiProductDescription::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_description(var_1884);
}
,
s if s.matches("reservedInstancesOfferingId") /* ReservedInstancesOfferingId com.amazonaws.ec2#ReservedInstancesOffering$ReservedInstancesOfferingId */ => {
let var_1885 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_offering_id(var_1885);
}
,
s if s.matches("usagePrice") /* UsagePrice com.amazonaws.ec2#ReservedInstancesOffering$UsagePrice */ => {
let var_1886 =
Some(
{
<f32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (float: `com.amazonaws.ec2#Float`)"))
}
?
)
;
builder = builder.set_usage_price(var_1886);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#ReservedInstancesOffering$CurrencyCode */ => {
let var_1887 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_1887);
}
,
s if s.matches("instanceTenancy") /* InstanceTenancy com.amazonaws.ec2#ReservedInstancesOffering$InstanceTenancy */ => {
let var_1888 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_tenancy(var_1888);
}
,
s if s.matches("marketplace") /* Marketplace com.amazonaws.ec2#ReservedInstancesOffering$Marketplace */ => {
let var_1889 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_marketplace(var_1889);
}
,
s if s.matches("offeringClass") /* OfferingClass com.amazonaws.ec2#ReservedInstancesOffering$OfferingClass */ => {
let var_1890 =
Some(
Result::<crate::model::OfferingClassType, smithy_xml::decode::XmlError>::Ok(
crate::model::OfferingClassType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_offering_class(var_1890);
}
,
s if s.matches("offeringType") /* OfferingType com.amazonaws.ec2#ReservedInstancesOffering$OfferingType */ => {
let var_1891 =
Some(
Result::<crate::model::OfferingTypeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::OfferingTypeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_offering_type(var_1891);
}
,
s if s.matches("pricingDetailsSet") /* PricingDetails com.amazonaws.ec2#ReservedInstancesOffering$PricingDetails */ => {
let var_1892 =
Some(
crate::xml_deser::deser_list_pricing_details_list(&mut tag)
?
)
;
builder = builder.set_pricing_details(var_1892);
}
,
s if s.matches("recurringCharges") /* RecurringCharges com.amazonaws.ec2#ReservedInstancesOffering$RecurringCharges */ => {
let var_1893 =
Some(
crate::xml_deser::deser_list_recurring_charges_list(&mut tag)
?
)
;
builder = builder.set_recurring_charges(var_1893);
}
,
s if s.matches("scope") /* Scope com.amazonaws.ec2#ReservedInstancesOffering$Scope */ => {
let var_1894 =
Some(
Result::<crate::model::Scope, smithy_xml::decode::XmlError>::Ok(
crate::model::Scope::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_scope(var_1894);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_scheduled_instance_availability(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstanceAvailability, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstanceAvailability::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstanceAvailability$AvailabilityZone */ => {
let var_1895 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1895);
}
,
s if s.matches("availableInstanceCount") /* AvailableInstanceCount com.amazonaws.ec2#ScheduledInstanceAvailability$AvailableInstanceCount */ => {
let var_1896 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_instance_count(var_1896);
}
,
s if s.matches("firstSlotStartTime") /* FirstSlotStartTime com.amazonaws.ec2#ScheduledInstanceAvailability$FirstSlotStartTime */ => {
let var_1897 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_first_slot_start_time(var_1897);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstanceAvailability$HourlyPrice */ => {
let var_1898 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_1898);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstanceAvailability$InstanceType */ => {
let var_1899 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_1899);
}
,
s if s.matches("maxTermDurationInDays") /* MaxTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MaxTermDurationInDays */ => {
let var_1900 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_max_term_duration_in_days(var_1900);
}
,
s if s.matches("minTermDurationInDays") /* MinTermDurationInDays com.amazonaws.ec2#ScheduledInstanceAvailability$MinTermDurationInDays */ => {
let var_1901 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_term_duration_in_days(var_1901);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstanceAvailability$NetworkPlatform */ => {
let var_1902 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_platform(var_1902);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstanceAvailability$Platform */ => {
let var_1903 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_1903);
}
,
s if s.matches("purchaseToken") /* PurchaseToken com.amazonaws.ec2#ScheduledInstanceAvailability$PurchaseToken */ => {
let var_1904 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_purchase_token(var_1904);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstanceAvailability$Recurrence */ => {
let var_1905 =
Some(
crate::xml_deser::deser_structure_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_1905);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstanceAvailability$SlotDurationInHours */ => {
let var_1906 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_slot_duration_in_hours(var_1906);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstanceAvailability$TotalScheduledInstanceHours */ => {
let var_1907 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_scheduled_instance_hours(var_1907);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_scheduled_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ScheduledInstance$AvailabilityZone */ => {
let var_1908 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1908);
}
,
s if s.matches("createDate") /* CreateDate com.amazonaws.ec2#ScheduledInstance$CreateDate */ => {
let var_1909 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_date(var_1909);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#ScheduledInstance$HourlyPrice */ => {
let var_1910 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_1910);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ScheduledInstance$InstanceCount */ => {
let var_1911 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_count(var_1911);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ScheduledInstance$InstanceType */ => {
let var_1912 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_1912);
}
,
s if s.matches("networkPlatform") /* NetworkPlatform com.amazonaws.ec2#ScheduledInstance$NetworkPlatform */ => {
let var_1913 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_platform(var_1913);
}
,
s if s.matches("nextSlotStartTime") /* NextSlotStartTime com.amazonaws.ec2#ScheduledInstance$NextSlotStartTime */ => {
let var_1914 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_next_slot_start_time(var_1914);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ScheduledInstance$Platform */ => {
let var_1915 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_1915);
}
,
s if s.matches("previousSlotEndTime") /* PreviousSlotEndTime com.amazonaws.ec2#ScheduledInstance$PreviousSlotEndTime */ => {
let var_1916 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_previous_slot_end_time(var_1916);
}
,
s if s.matches("recurrence") /* Recurrence com.amazonaws.ec2#ScheduledInstance$Recurrence */ => {
let var_1917 =
Some(
crate::xml_deser::deser_structure_scheduled_instance_recurrence(&mut tag)
?
)
;
builder = builder.set_recurrence(var_1917);
}
,
s if s.matches("scheduledInstanceId") /* ScheduledInstanceId com.amazonaws.ec2#ScheduledInstance$ScheduledInstanceId */ => {
let var_1918 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_scheduled_instance_id(var_1918);
}
,
s if s.matches("slotDurationInHours") /* SlotDurationInHours com.amazonaws.ec2#ScheduledInstance$SlotDurationInHours */ => {
let var_1919 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_slot_duration_in_hours(var_1919);
}
,
s if s.matches("termEndDate") /* TermEndDate com.amazonaws.ec2#ScheduledInstance$TermEndDate */ => {
let var_1920 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_term_end_date(var_1920);
}
,
s if s.matches("termStartDate") /* TermStartDate com.amazonaws.ec2#ScheduledInstance$TermStartDate */ => {
let var_1921 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_term_start_date(var_1921);
}
,
s if s.matches("totalScheduledInstanceHours") /* TotalScheduledInstanceHours com.amazonaws.ec2#ScheduledInstance$TotalScheduledInstanceHours */ => {
let var_1922 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_scheduled_instance_hours(var_1922);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_security_group_reference(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SecurityGroupReference, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SecurityGroupReference::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroupReference$GroupId */ => {
let var_1923 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1923);
}
,
s if s.matches("referencingVpcId") /* ReferencingVpcId com.amazonaws.ec2#SecurityGroupReference$ReferencingVpcId */ => {
let var_1924 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_referencing_vpc_id(var_1924);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#SecurityGroupReference$VpcPeeringConnectionId */ => {
let var_1925 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_1925);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_security_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SecurityGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SecurityGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupDescription") /* Description com.amazonaws.ec2#SecurityGroup$Description */ => {
let var_1926 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1926);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SecurityGroup$GroupName */ => {
let var_1927 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_1927);
}
,
s if s.matches("ipPermissions") /* IpPermissions com.amazonaws.ec2#SecurityGroup$IpPermissions */ => {
let var_1928 =
Some(
crate::xml_deser::deser_list_ip_permission_list(&mut tag)
?
)
;
builder = builder.set_ip_permissions(var_1928);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#SecurityGroup$OwnerId */ => {
let var_1929 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1929);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroup$GroupId */ => {
let var_1930 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1930);
}
,
s if s.matches("ipPermissionsEgress") /* IpPermissionsEgress com.amazonaws.ec2#SecurityGroup$IpPermissionsEgress */ => {
let var_1931 =
Some(
crate::xml_deser::deser_list_ip_permission_list(&mut tag)
?
)
;
builder = builder.set_ip_permissions_egress(var_1931);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SecurityGroup$Tags */ => {
let var_1932 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1932);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#SecurityGroup$VpcId */ => {
let var_1933 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1933);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_create_volume_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CreateVolumePermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CreateVolumePermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("group") /* Group com.amazonaws.ec2#CreateVolumePermission$Group */ => {
let var_1934 =
Some(
Result::<crate::model::PermissionGroup, smithy_xml::decode::XmlError>::Ok(
crate::model::PermissionGroup::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_group(var_1934);
}
,
s if s.matches("userId") /* UserId com.amazonaws.ec2#CreateVolumePermission$UserId */ => {
let var_1935 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_id(var_1935);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_snapshot(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Snapshot, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Snapshot::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dataEncryptionKeyId") /* DataEncryptionKeyId com.amazonaws.ec2#Snapshot$DataEncryptionKeyId */ => {
let var_1936 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_data_encryption_key_id(var_1936);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#Snapshot$Description */ => {
let var_1937 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1937);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#Snapshot$Encrypted */ => {
let var_1938 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_1938);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#Snapshot$KmsKeyId */ => {
let var_1939 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_1939);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Snapshot$OwnerId */ => {
let var_1940 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_1940);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#Snapshot$Progress */ => {
let var_1941 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_1941);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#Snapshot$SnapshotId */ => {
let var_1942 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_1942);
}
,
s if s.matches("startTime") /* StartTime com.amazonaws.ec2#Snapshot$StartTime */ => {
let var_1943 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_start_time(var_1943);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#Snapshot$State */ => {
let var_1944 =
Some(
Result::<crate::model::SnapshotState, smithy_xml::decode::XmlError>::Ok(
crate::model::SnapshotState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1944);
}
,
s if s.matches("statusMessage") /* StateMessage com.amazonaws.ec2#Snapshot$StateMessage */ => {
let var_1945 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_message(var_1945);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#Snapshot$VolumeId */ => {
let var_1946 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_1946);
}
,
s if s.matches("volumeSize") /* VolumeSize com.amazonaws.ec2#Snapshot$VolumeSize */ => {
let var_1947 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_volume_size(var_1947);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#Snapshot$OwnerAlias */ => {
let var_1948 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_1948);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Snapshot$OutpostArn */ => {
let var_1949 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_1949);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Snapshot$Tags */ => {
let var_1950 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1950);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_history_record(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HistoryRecord, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HistoryRecord::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("eventInformation") /* EventInformation com.amazonaws.ec2#HistoryRecord$EventInformation */ => {
let var_1951 =
Some(
crate::xml_deser::deser_structure_event_information(&mut tag)
?
)
;
builder = builder.set_event_information(var_1951);
}
,
s if s.matches("eventType") /* EventType com.amazonaws.ec2#HistoryRecord$EventType */ => {
let var_1952 =
Some(
Result::<crate::model::EventType, smithy_xml::decode::XmlError>::Ok(
crate::model::EventType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_event_type(var_1952);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#HistoryRecord$Timestamp */ => {
let var_1953 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_1953);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_fleet_request_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetRequestConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetRequestConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("activityStatus") /* ActivityStatus com.amazonaws.ec2#SpotFleetRequestConfig$ActivityStatus */ => {
let var_1954 =
Some(
Result::<crate::model::ActivityStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::ActivityStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_activity_status(var_1954);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#SpotFleetRequestConfig$CreateTime */ => {
let var_1955 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_create_time(var_1955);
}
,
s if s.matches("spotFleetRequestConfig") /* SpotFleetRequestConfig com.amazonaws.ec2#SpotFleetRequestConfig$SpotFleetRequestConfig */ => {
let var_1956 =
Some(
crate::xml_deser::deser_structure_spot_fleet_request_config_data(&mut tag)
?
)
;
builder = builder.set_spot_fleet_request_config(var_1956);
}
,
s if s.matches("spotFleetRequestId") /* SpotFleetRequestId com.amazonaws.ec2#SpotFleetRequestConfig$SpotFleetRequestId */ => {
let var_1957 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_fleet_request_id(var_1957);
}
,
s if s.matches("spotFleetRequestState") /* SpotFleetRequestState com.amazonaws.ec2#SpotFleetRequestConfig$SpotFleetRequestState */ => {
let var_1958 =
Some(
Result::<crate::model::BatchState, smithy_xml::decode::XmlError>::Ok(
crate::model::BatchState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_spot_fleet_request_state(var_1958);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SpotFleetRequestConfig$Tags */ => {
let var_1959 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1959);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_instance_request(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotInstanceRequest, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotInstanceRequest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("actualBlockHourlyPrice") /* ActualBlockHourlyPrice com.amazonaws.ec2#SpotInstanceRequest$ActualBlockHourlyPrice */ => {
let var_1960 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_actual_block_hourly_price(var_1960);
}
,
s if s.matches("availabilityZoneGroup") /* AvailabilityZoneGroup com.amazonaws.ec2#SpotInstanceRequest$AvailabilityZoneGroup */ => {
let var_1961 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone_group(var_1961);
}
,
s if s.matches("blockDurationMinutes") /* BlockDurationMinutes com.amazonaws.ec2#SpotInstanceRequest$BlockDurationMinutes */ => {
let var_1962 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_block_duration_minutes(var_1962);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#SpotInstanceRequest$CreateTime */ => {
let var_1963 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_1963);
}
,
s if s.matches("fault") /* Fault com.amazonaws.ec2#SpotInstanceRequest$Fault */ => {
let var_1964 =
Some(
crate::xml_deser::deser_structure_spot_instance_state_fault(&mut tag)
?
)
;
builder = builder.set_fault(var_1964);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#SpotInstanceRequest$InstanceId */ => {
let var_1965 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_1965);
}
,
s if s.matches("launchGroup") /* LaunchGroup com.amazonaws.ec2#SpotInstanceRequest$LaunchGroup */ => {
let var_1966 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_group(var_1966);
}
,
s if s.matches("launchSpecification") /* LaunchSpecification com.amazonaws.ec2#SpotInstanceRequest$LaunchSpecification */ => {
let var_1967 =
Some(
crate::xml_deser::deser_structure_launch_specification(&mut tag)
?
)
;
builder = builder.set_launch_specification(var_1967);
}
,
s if s.matches("launchedAvailabilityZone") /* LaunchedAvailabilityZone com.amazonaws.ec2#SpotInstanceRequest$LaunchedAvailabilityZone */ => {
let var_1968 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launched_availability_zone(var_1968);
}
,
s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#SpotInstanceRequest$ProductDescription */ => {
let var_1969 =
Some(
Result::<crate::model::RiProductDescription, smithy_xml::decode::XmlError>::Ok(
crate::model::RiProductDescription::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_description(var_1969);
}
,
s if s.matches("spotInstanceRequestId") /* SpotInstanceRequestId com.amazonaws.ec2#SpotInstanceRequest$SpotInstanceRequestId */ => {
let var_1970 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_instance_request_id(var_1970);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotInstanceRequest$SpotPrice */ => {
let var_1971 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_1971);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#SpotInstanceRequest$State */ => {
let var_1972 =
Some(
Result::<crate::model::SpotInstanceState, smithy_xml::decode::XmlError>::Ok(
crate::model::SpotInstanceState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_1972);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#SpotInstanceRequest$Status */ => {
let var_1973 =
Some(
crate::xml_deser::deser_structure_spot_instance_status(&mut tag)
?
)
;
builder = builder.set_status(var_1973);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#SpotInstanceRequest$Tags */ => {
let var_1974 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1974);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#SpotInstanceRequest$Type */ => {
let var_1975 =
Some(
Result::<crate::model::SpotInstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::SpotInstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_1975);
}
,
s if s.matches("validFrom") /* ValidFrom com.amazonaws.ec2#SpotInstanceRequest$ValidFrom */ => {
let var_1976 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_from(var_1976);
}
,
s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#SpotInstanceRequest$ValidUntil */ => {
let var_1977 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_until(var_1977);
}
,
s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#SpotInstanceRequest$InstanceInterruptionBehavior */ => {
let var_1978 =
Some(
Result::<crate::model::InstanceInterruptionBehavior, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceInterruptionBehavior::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_interruption_behavior(var_1978);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_price(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPrice, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPrice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPrice$AvailabilityZone */ => {
let var_1979 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_1979);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#SpotPrice$InstanceType */ => {
let var_1980 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_1980);
}
,
s if s.matches("productDescription") /* ProductDescription com.amazonaws.ec2#SpotPrice$ProductDescription */ => {
let var_1981 =
Some(
Result::<crate::model::RiProductDescription, smithy_xml::decode::XmlError>::Ok(
crate::model::RiProductDescription::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_description(var_1981);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotPrice$SpotPrice */ => {
let var_1982 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_1982);
}
,
s if s.matches("timestamp") /* Timestamp com.amazonaws.ec2#SpotPrice$Timestamp */ => {
let var_1983 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_timestamp(var_1983);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_stale_security_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StaleSecurityGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::StaleSecurityGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#StaleSecurityGroup$Description */ => {
let var_1984 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_1984);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#StaleSecurityGroup$GroupId */ => {
let var_1985 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_1985);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#StaleSecurityGroup$GroupName */ => {
let var_1986 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_1986);
}
,
s if s.matches("staleIpPermissions") /* StaleIpPermissions com.amazonaws.ec2#StaleSecurityGroup$StaleIpPermissions */ => {
let var_1987 =
Some(
crate::xml_deser::deser_list_stale_ip_permission_set(&mut tag)
?
)
;
builder = builder.set_stale_ip_permissions(var_1987);
}
,
s if s.matches("staleIpPermissionsEgress") /* StaleIpPermissionsEgress com.amazonaws.ec2#StaleSecurityGroup$StaleIpPermissionsEgress */ => {
let var_1988 =
Some(
crate::xml_deser::deser_list_stale_ip_permission_set(&mut tag)
?
)
;
builder = builder.set_stale_ip_permissions_egress(var_1988);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#StaleSecurityGroup$VpcId */ => {
let var_1989 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_1989);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_store_image_task_result(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StoreImageTaskResult, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::StoreImageTaskResult::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amiId") /* AmiId com.amazonaws.ec2#StoreImageTaskResult$AmiId */ => {
let var_1990 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ami_id(var_1990);
}
,
s if s.matches("taskStartTime") /* TaskStartTime com.amazonaws.ec2#StoreImageTaskResult$TaskStartTime */ => {
let var_1991 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_task_start_time(var_1991);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#StoreImageTaskResult$Bucket */ => {
let var_1992 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_1992);
}
,
s if s.matches("s3objectKey") /* S3objectKey com.amazonaws.ec2#StoreImageTaskResult$S3objectKey */ => {
let var_1993 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3object_key(var_1993);
}
,
s if s.matches("progressPercentage") /* ProgressPercentage com.amazonaws.ec2#StoreImageTaskResult$ProgressPercentage */ => {
let var_1994 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_progress_percentage(var_1994);
}
,
s if s.matches("storeTaskState") /* StoreTaskState com.amazonaws.ec2#StoreImageTaskResult$StoreTaskState */ => {
let var_1995 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_store_task_state(var_1995);
}
,
s if s.matches("storeTaskFailureReason") /* StoreTaskFailureReason com.amazonaws.ec2#StoreImageTaskResult$StoreTaskFailureReason */ => {
let var_1996 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_store_task_failure_reason(var_1996);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_tag_description(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TagDescription, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TagDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#TagDescription$Key */ => {
let var_1997 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_1997);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TagDescription$ResourceId */ => {
let var_1998 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_1998);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TagDescription$ResourceType */ => {
let var_1999 =
Some(
Result::<crate::model::ResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::ResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_1999);
}
,
s if s.matches("value") /* Value com.amazonaws.ec2#TagDescription$Value */ => {
let var_2000 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2000);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayAttachmentId */ => {
let var_2001 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2001);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayId */ => {
let var_2002 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_2002);
}
,
s if s.matches("transitGatewayOwnerId") /* TransitGatewayOwnerId com.amazonaws.ec2#TransitGatewayAttachment$TransitGatewayOwnerId */ => {
let var_2003 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_owner_id(var_2003);
}
,
s if s.matches("resourceOwnerId") /* ResourceOwnerId com.amazonaws.ec2#TransitGatewayAttachment$ResourceOwnerId */ => {
let var_2004 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_owner_id(var_2004);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayAttachment$ResourceType */ => {
let var_2005 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2005);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayAttachment$ResourceId */ => {
let var_2006 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2006);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayAttachment$State */ => {
let var_2007 =
Some(
Result::<crate::model::TransitGatewayAttachmentState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2007);
}
,
s if s.matches("association") /* Association com.amazonaws.ec2#TransitGatewayAttachment$Association */ => {
let var_2008 =
Some(
crate::xml_deser::deser_structure_transit_gateway_attachment_association(&mut tag)
?
)
;
builder = builder.set_association(var_2008);
}
,
s if s.matches("creationTime") /* CreationTime com.amazonaws.ec2#TransitGatewayAttachment$CreationTime */ => {
let var_2009 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_creation_time(var_2009);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#TransitGatewayAttachment$Tags */ => {
let var_2010 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2010);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_volume(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Volume, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Volume::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachmentSet") /* Attachments com.amazonaws.ec2#Volume$Attachments */ => {
let var_2011 =
Some(
crate::xml_deser::deser_list_volume_attachment_list(&mut tag)
?
)
;
builder = builder.set_attachments(var_2011);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Volume$AvailabilityZone */ => {
let var_2012 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2012);
}
,
s if s.matches("createTime") /* CreateTime com.amazonaws.ec2#Volume$CreateTime */ => {
let var_2013 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_create_time(var_2013);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#Volume$Encrypted */ => {
let var_2014 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_2014);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#Volume$KmsKeyId */ => {
let var_2015 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_2015);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Volume$OutpostArn */ => {
let var_2016 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_2016);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#Volume$Size */ => {
let var_2017 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_size(var_2017);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#Volume$SnapshotId */ => {
let var_2018 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2018);
}
,
s if s.matches("status") /* State com.amazonaws.ec2#Volume$State */ => {
let var_2019 =
Some(
Result::<crate::model::VolumeState, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2019);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#Volume$VolumeId */ => {
let var_2020 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_2020);
}
,
s if s.matches("iops") /* Iops com.amazonaws.ec2#Volume$Iops */ => {
let var_2021 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_iops(var_2021);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Volume$Tags */ => {
let var_2022 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2022);
}
,
s if s.matches("volumeType") /* VolumeType com.amazonaws.ec2#Volume$VolumeType */ => {
let var_2023 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_volume_type(var_2023);
}
,
s if s.matches("fastRestored") /* FastRestored com.amazonaws.ec2#Volume$FastRestored */ => {
let var_2024 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_fast_restored(var_2024);
}
,
s if s.matches("multiAttachEnabled") /* MultiAttachEnabled com.amazonaws.ec2#Volume$MultiAttachEnabled */ => {
let var_2025 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_multi_attach_enabled(var_2025);
}
,
s if s.matches("throughput") /* Throughput com.amazonaws.ec2#Volume$Throughput */ => {
let var_2026 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_throughput(var_2026);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_volume_status_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("actionsSet") /* Actions com.amazonaws.ec2#VolumeStatusItem$Actions */ => {
let var_2027 =
Some(
crate::xml_deser::deser_list_volume_status_actions_list(&mut tag)
?
)
;
builder = builder.set_actions(var_2027);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#VolumeStatusItem$AvailabilityZone */ => {
let var_2028 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2028);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#VolumeStatusItem$OutpostArn */ => {
let var_2029 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_2029);
}
,
s if s.matches("eventsSet") /* Events com.amazonaws.ec2#VolumeStatusItem$Events */ => {
let var_2030 =
Some(
crate::xml_deser::deser_list_volume_status_events_list(&mut tag)
?
)
;
builder = builder.set_events(var_2030);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#VolumeStatusItem$VolumeId */ => {
let var_2031 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_2031);
}
,
s if s.matches("volumeStatus") /* VolumeStatus com.amazonaws.ec2#VolumeStatusItem$VolumeStatus */ => {
let var_2032 =
Some(
crate::xml_deser::deser_structure_volume_status_info(&mut tag)
?
)
;
builder = builder.set_volume_status(var_2032);
}
,
s if s.matches("attachmentStatuses") /* AttachmentStatuses com.amazonaws.ec2#VolumeStatusItem$AttachmentStatuses */ => {
let var_2033 =
Some(
crate::xml_deser::deser_list_volume_status_attachment_status_list(&mut tag)
?
)
;
builder = builder.set_attachment_statuses(var_2033);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_classic_link(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcClassicLink, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcClassicLink::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("classicLinkEnabled") /* ClassicLinkEnabled com.amazonaws.ec2#VpcClassicLink$ClassicLinkEnabled */ => {
let var_2034 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_classic_link_enabled(var_2034);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#VpcClassicLink$Tags */ => {
let var_2035 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2035);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#VpcClassicLink$VpcId */ => {
let var_2036 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2036);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_classic_link_dns_support(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClassicLinkDnsSupport, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClassicLinkDnsSupport::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("classicLinkDnsSupported") /* ClassicLinkDnsSupported com.amazonaws.ec2#ClassicLinkDnsSupport$ClassicLinkDnsSupported */ => {
let var_2037 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_classic_link_dns_supported(var_2037);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#ClassicLinkDnsSupport$VpcId */ => {
let var_2038 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2038);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vpc_endpoint_connection(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcEndpointConnection, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcEndpointConnection::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceId") /* ServiceId com.amazonaws.ec2#VpcEndpointConnection$ServiceId */ => {
let var_2039 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_id(var_2039);
}
,
s if s.matches("vpcEndpointId") /* VpcEndpointId com.amazonaws.ec2#VpcEndpointConnection$VpcEndpointId */ => {
let var_2040 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_endpoint_id(var_2040);
}
,
s if s.matches("vpcEndpointOwner") /* VpcEndpointOwner com.amazonaws.ec2#VpcEndpointConnection$VpcEndpointOwner */ => {
let var_2041 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_endpoint_owner(var_2041);
}
,
s if s.matches("vpcEndpointState") /* VpcEndpointState com.amazonaws.ec2#VpcEndpointConnection$VpcEndpointState */ => {
let var_2042 =
Some(
Result::<crate::model::State, smithy_xml::decode::XmlError>::Ok(
crate::model::State::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_vpc_endpoint_state(var_2042);
}
,
s if s.matches("creationTimestamp") /* CreationTimestamp com.amazonaws.ec2#VpcEndpointConnection$CreationTimestamp */ => {
let var_2043 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_creation_timestamp(var_2043);
}
,
s if s.matches("dnsEntrySet") /* DnsEntries com.amazonaws.ec2#VpcEndpointConnection$DnsEntries */ => {
let var_2044 =
Some(
crate::xml_deser::deser_list_dns_entry_set(&mut tag)
?
)
;
builder = builder.set_dns_entries(var_2044);
}
,
s if s.matches("networkLoadBalancerArnSet") /* NetworkLoadBalancerArns com.amazonaws.ec2#VpcEndpointConnection$NetworkLoadBalancerArns */ => {
let var_2045 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_network_load_balancer_arns(var_2045);
}
,
s if s.matches("gatewayLoadBalancerArnSet") /* GatewayLoadBalancerArns com.amazonaws.ec2#VpcEndpointConnection$GatewayLoadBalancerArns */ => {
let var_2046 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_gateway_load_balancer_arns(var_2046);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_allowed_principal(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AllowedPrincipal, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AllowedPrincipal::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("principalType") /* PrincipalType com.amazonaws.ec2#AllowedPrincipal$PrincipalType */ => {
let var_2047 =
Some(
Result::<crate::model::PrincipalType, smithy_xml::decode::XmlError>::Ok(
crate::model::PrincipalType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_principal_type(var_2047);
}
,
s if s.matches("principal") /* Principal com.amazonaws.ec2#AllowedPrincipal$Principal */ => {
let var_2048 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_principal(var_2048);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_service_detail(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServiceDetail, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ServiceDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceName") /* ServiceName com.amazonaws.ec2#ServiceDetail$ServiceName */ => {
let var_2049 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_name(var_2049);
}
,
s if s.matches("serviceId") /* ServiceId com.amazonaws.ec2#ServiceDetail$ServiceId */ => {
let var_2050 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_service_id(var_2050);
}
,
s if s.matches("serviceType") /* ServiceType com.amazonaws.ec2#ServiceDetail$ServiceType */ => {
let var_2051 =
Some(
crate::xml_deser::deser_list_service_type_detail_set(&mut tag)
?
)
;
builder = builder.set_service_type(var_2051);
}
,
s if s.matches("availabilityZoneSet") /* AvailabilityZones com.amazonaws.ec2#ServiceDetail$AvailabilityZones */ => {
let var_2052 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_2052);
}
,
s if s.matches("owner") /* Owner com.amazonaws.ec2#ServiceDetail$Owner */ => {
let var_2053 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner(var_2053);
}
,
s if s.matches("baseEndpointDnsNameSet") /* BaseEndpointDnsNames com.amazonaws.ec2#ServiceDetail$BaseEndpointDnsNames */ => {
let var_2054 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_base_endpoint_dns_names(var_2054);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#ServiceDetail$PrivateDnsName */ => {
let var_2055 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2055);
}
,
s if s.matches("privateDnsNameSet") /* PrivateDnsNames com.amazonaws.ec2#ServiceDetail$PrivateDnsNames */ => {
let var_2056 =
Some(
crate::xml_deser::deser_list_private_dns_details_set(&mut tag)
?
)
;
builder = builder.set_private_dns_names(var_2056);
}
,
s if s.matches("vpcEndpointPolicySupported") /* VpcEndpointPolicySupported com.amazonaws.ec2#ServiceDetail$VpcEndpointPolicySupported */ => {
let var_2057 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_vpc_endpoint_policy_supported(var_2057);
}
,
s if s.matches("acceptanceRequired") /* AcceptanceRequired com.amazonaws.ec2#ServiceDetail$AcceptanceRequired */ => {
let var_2058 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_acceptance_required(var_2058);
}
,
s if s.matches("managesVpcEndpoints") /* ManagesVpcEndpoints com.amazonaws.ec2#ServiceDetail$ManagesVpcEndpoints */ => {
let var_2059 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_manages_vpc_endpoints(var_2059);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#ServiceDetail$Tags */ => {
let var_2060 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2060);
}
,
s if s.matches("privateDnsNameVerificationState") /* PrivateDnsNameVerificationState com.amazonaws.ec2#ServiceDetail$PrivateDnsNameVerificationState */ => {
let var_2061 =
Some(
Result::<crate::model::DnsNameState, smithy_xml::decode::XmlError>::Ok(
crate::model::DnsNameState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_private_dns_name_verification_state(var_2061);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disable_fast_snapshot_restore_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DisableFastSnapshotRestoreSuccessItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DisableFastSnapshotRestoreSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$SnapshotId */ => {
let var_2062 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2062);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$AvailabilityZone */ => {
let var_2063 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2063);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$State */ => {
let var_2064 =
Some(
Result::<crate::model::FastSnapshotRestoreStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FastSnapshotRestoreStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2064);
}
,
s if s.matches("stateTransitionReason") /* StateTransitionReason com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$StateTransitionReason */ => {
let var_2065 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_transition_reason(var_2065);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$OwnerId */ => {
let var_2066 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_2066);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$OwnerAlias */ => {
let var_2067 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_2067);
}
,
s if s.matches("enablingTime") /* EnablingTime com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$EnablingTime */ => {
let var_2068 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabling_time(var_2068);
}
,
s if s.matches("optimizingTime") /* OptimizingTime com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$OptimizingTime */ => {
let var_2069 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_optimizing_time(var_2069);
}
,
s if s.matches("enabledTime") /* EnabledTime com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$EnabledTime */ => {
let var_2070 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabled_time(var_2070);
}
,
s if s.matches("disablingTime") /* DisablingTime com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$DisablingTime */ => {
let var_2071 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabling_time(var_2071);
}
,
s if s.matches("disabledTime") /* DisabledTime com.amazonaws.ec2#DisableFastSnapshotRestoreSuccessItem$DisabledTime */ => {
let var_2072 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabled_time(var_2072);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disable_fast_snapshot_restore_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DisableFastSnapshotRestoreErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DisableFastSnapshotRestoreErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#DisableFastSnapshotRestoreErrorItem$SnapshotId */ => {
let var_2073 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2073);
}
,
s if s.matches("fastSnapshotRestoreStateErrorSet") /* FastSnapshotRestoreStateErrors com.amazonaws.ec2#DisableFastSnapshotRestoreErrorItem$FastSnapshotRestoreStateErrors */ => {
let var_2074 =
Some(
crate::xml_deser::deser_list_disable_fast_snapshot_restore_state_error_set(&mut tag)
?
)
;
builder = builder.set_fast_snapshot_restore_state_errors(var_2074);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_enable_fast_snapshot_restore_success_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EnableFastSnapshotRestoreSuccessItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EnableFastSnapshotRestoreSuccessItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$SnapshotId */ => {
let var_2075 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2075);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$AvailabilityZone */ => {
let var_2076 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2076);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$State */ => {
let var_2077 =
Some(
Result::<crate::model::FastSnapshotRestoreStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FastSnapshotRestoreStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2077);
}
,
s if s.matches("stateTransitionReason") /* StateTransitionReason com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$StateTransitionReason */ => {
let var_2078 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_transition_reason(var_2078);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$OwnerId */ => {
let var_2079 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_2079);
}
,
s if s.matches("ownerAlias") /* OwnerAlias com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$OwnerAlias */ => {
let var_2080 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_alias(var_2080);
}
,
s if s.matches("enablingTime") /* EnablingTime com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$EnablingTime */ => {
let var_2081 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabling_time(var_2081);
}
,
s if s.matches("optimizingTime") /* OptimizingTime com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$OptimizingTime */ => {
let var_2082 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_optimizing_time(var_2082);
}
,
s if s.matches("enabledTime") /* EnabledTime com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$EnabledTime */ => {
let var_2083 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_enabled_time(var_2083);
}
,
s if s.matches("disablingTime") /* DisablingTime com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$DisablingTime */ => {
let var_2084 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabling_time(var_2084);
}
,
s if s.matches("disabledTime") /* DisabledTime com.amazonaws.ec2#EnableFastSnapshotRestoreSuccessItem$DisabledTime */ => {
let var_2085 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_disabled_time(var_2085);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_enable_fast_snapshot_restore_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EnableFastSnapshotRestoreErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EnableFastSnapshotRestoreErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#EnableFastSnapshotRestoreErrorItem$SnapshotId */ => {
let var_2086 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2086);
}
,
s if s.matches("fastSnapshotRestoreStateErrorSet") /* FastSnapshotRestoreStateErrors com.amazonaws.ec2#EnableFastSnapshotRestoreErrorItem$FastSnapshotRestoreStateErrors */ => {
let var_2087 =
Some(
crate::xml_deser::deser_list_enable_fast_snapshot_restore_state_error_set(&mut tag)
?
)
;
builder = builder.set_fast_snapshot_restore_state_errors(var_2087);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_associated_role(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AssociatedRole, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AssociatedRole::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associatedRoleArn") /* AssociatedRoleArn com.amazonaws.ec2#AssociatedRole$AssociatedRoleArn */ => {
let var_2088 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_associated_role_arn(var_2088);
}
,
s if s.matches("certificateS3BucketName") /* CertificateS3BucketName com.amazonaws.ec2#AssociatedRole$CertificateS3BucketName */ => {
let var_2089 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_s3_bucket_name(var_2089);
}
,
s if s.matches("certificateS3ObjectKey") /* CertificateS3ObjectKey com.amazonaws.ec2#AssociatedRole$CertificateS3ObjectKey */ => {
let var_2090 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_s3_object_key(var_2090);
}
,
s if s.matches("encryptionKmsKeyId") /* EncryptionKmsKeyId com.amazonaws.ec2#AssociatedRole$EncryptionKmsKeyId */ => {
let var_2091 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_encryption_kms_key_id(var_2091);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_cidr_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6CidrAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6CidrAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Cidr") /* Ipv6Cidr com.amazonaws.ec2#Ipv6CidrAssociation$Ipv6Cidr */ => {
let var_2092 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_cidr(var_2092);
}
,
s if s.matches("associatedResource") /* AssociatedResource com.amazonaws.ec2#Ipv6CidrAssociation$AssociatedResource */ => {
let var_2093 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_associated_resource(var_2093);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_usage(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceUsage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceUsage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accountId") /* AccountId com.amazonaws.ec2#InstanceUsage$AccountId */ => {
let var_2094 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_account_id(var_2094);
}
,
s if s.matches("usedInstanceCount") /* UsedInstanceCount com.amazonaws.ec2#InstanceUsage$UsedInstanceCount */ => {
let var_2095 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_used_instance_count(var_2095);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_coip_address_usage(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CoipAddressUsage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CoipAddressUsage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#CoipAddressUsage$AllocationId */ => {
let var_2096 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_2096);
}
,
s if s.matches("awsAccountId") /* AwsAccountId com.amazonaws.ec2#CoipAddressUsage$AwsAccountId */ => {
let var_2097 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_account_id(var_2097);
}
,
s if s.matches("awsService") /* AwsService com.amazonaws.ec2#CoipAddressUsage$AwsService */ => {
let var_2098 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_service(var_2098);
}
,
s if s.matches("coIp") /* CoIp com.amazonaws.ec2#CoipAddressUsage$CoIp */ => {
let var_2099 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_co_ip(var_2099);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_capacity_reservation_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservationGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservationGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupArn") /* GroupArn com.amazonaws.ec2#CapacityReservationGroup$GroupArn */ => {
let var_2100 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_arn(var_2100);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#CapacityReservationGroup$OwnerId */ => {
let var_2101 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_2101);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_purchase(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Purchase, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Purchase::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#Purchase$CurrencyCode */ => {
let var_2102 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_2102);
}
,
s if s.matches("duration") /* Duration com.amazonaws.ec2#Purchase$Duration */ => {
let var_2103 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_duration(var_2103);
}
,
s if s.matches("hostIdSet") /* HostIdSet com.amazonaws.ec2#Purchase$HostIdSet */ => {
let var_2104 =
Some(
crate::xml_deser::deser_list_response_host_id_set(&mut tag)
?
)
;
builder = builder.set_host_id_set(var_2104);
}
,
s if s.matches("hostReservationId") /* HostReservationId com.amazonaws.ec2#Purchase$HostReservationId */ => {
let var_2105 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_reservation_id(var_2105);
}
,
s if s.matches("hourlyPrice") /* HourlyPrice com.amazonaws.ec2#Purchase$HourlyPrice */ => {
let var_2106 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hourly_price(var_2106);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#Purchase$InstanceFamily */ => {
let var_2107 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_family(var_2107);
}
,
s if s.matches("paymentOption") /* PaymentOption com.amazonaws.ec2#Purchase$PaymentOption */ => {
let var_2108 =
Some(
Result::<crate::model::PaymentOption, smithy_xml::decode::XmlError>::Ok(
crate::model::PaymentOption::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_payment_option(var_2108);
}
,
s if s.matches("upfrontPrice") /* UpfrontPrice com.amazonaws.ec2#Purchase$UpfrontPrice */ => {
let var_2109 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upfront_price(var_2109);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_iam_instance_profile_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateIamInstanceProfileSpecification, smithy_xml::decode::XmlError>
{
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateIamInstanceProfileSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("arn") /* Arn com.amazonaws.ec2#LaunchTemplateIamInstanceProfileSpecification$Arn */ => {
let var_2110 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_2110);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#LaunchTemplateIamInstanceProfileSpecification$Name */ => {
let var_2111 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2111);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_launch_template_block_device_mapping_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LaunchTemplateBlockDeviceMapping>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateBlockDeviceMappingList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_block_device_mapping(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_instance_network_interface_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_instance_network_interface_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_launch_templates_monitoring(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplatesMonitoring, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplatesMonitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#LaunchTemplatesMonitoring$Enabled */ => {
let var_2112 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2112);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_placement(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplatePlacement, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplatePlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#LaunchTemplatePlacement$AvailabilityZone */ => {
let var_2113 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2113);
}
,
s if s.matches("affinity") /* Affinity com.amazonaws.ec2#LaunchTemplatePlacement$Affinity */ => {
let var_2114 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_affinity(var_2114);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#LaunchTemplatePlacement$GroupName */ => {
let var_2115 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2115);
}
,
s if s.matches("hostId") /* HostId com.amazonaws.ec2#LaunchTemplatePlacement$HostId */ => {
let var_2116 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_id(var_2116);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#LaunchTemplatePlacement$Tenancy */ => {
let var_2117 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_2117);
}
,
s if s.matches("spreadDomain") /* SpreadDomain com.amazonaws.ec2#LaunchTemplatePlacement$SpreadDomain */ => {
let var_2118 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spread_domain(var_2118);
}
,
s if s.matches("hostResourceGroupArn") /* HostResourceGroupArn com.amazonaws.ec2#LaunchTemplatePlacement$HostResourceGroupArn */ => {
let var_2119 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_resource_group_arn(var_2119);
}
,
s if s.matches("partitionNumber") /* PartitionNumber com.amazonaws.ec2#LaunchTemplatePlacement$PartitionNumber */ => {
let var_2120 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_partition_number(var_2120);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_launch_template_tag_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchTemplateTagSpecification>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateTagSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_tag_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_elastic_gpu_specification_response_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::ElasticGpuSpecificationResponse>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ElasticGpuSpecificationResponseList$member */ => {
out.push(
crate::xml_deser::deser_structure_elastic_gpu_specification_response(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_elastic_inference_accelerator_response_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LaunchTemplateElasticInferenceAcceleratorResponse>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateElasticInferenceAcceleratorResponseList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_elastic_inference_accelerator_response(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_launch_template_instance_market_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateInstanceMarketOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateInstanceMarketOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("marketType") /* MarketType com.amazonaws.ec2#LaunchTemplateInstanceMarketOptions$MarketType */ => {
let var_2121 =
Some(
Result::<crate::model::MarketType, smithy_xml::decode::XmlError>::Ok(
crate::model::MarketType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_market_type(var_2121);
}
,
s if s.matches("spotOptions") /* SpotOptions com.amazonaws.ec2#LaunchTemplateInstanceMarketOptions$SpotOptions */ => {
let var_2122 =
Some(
crate::xml_deser::deser_structure_launch_template_spot_market_options(&mut tag)
?
)
;
builder = builder.set_spot_options(var_2122);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_credit_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CreditSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CreditSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cpuCredits") /* CpuCredits com.amazonaws.ec2#CreditSpecification$CpuCredits */ => {
let var_2123 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cpu_credits(var_2123);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_cpu_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateCpuOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateCpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#LaunchTemplateCpuOptions$CoreCount */ => {
let var_2124 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2124);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#LaunchTemplateCpuOptions$ThreadsPerCore */ => {
let var_2125 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2125);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_capacity_reservation_specification_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::LaunchTemplateCapacityReservationSpecificationResponse,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder =
crate::model::LaunchTemplateCapacityReservationSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationPreference") /* CapacityReservationPreference com.amazonaws.ec2#LaunchTemplateCapacityReservationSpecificationResponse$CapacityReservationPreference */ => {
let var_2126 =
Some(
Result::<crate::model::CapacityReservationPreference, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationPreference::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_capacity_reservation_preference(var_2126);
}
,
s if s.matches("capacityReservationTarget") /* CapacityReservationTarget com.amazonaws.ec2#LaunchTemplateCapacityReservationSpecificationResponse$CapacityReservationTarget */ => {
let var_2127 =
Some(
crate::xml_deser::deser_structure_capacity_reservation_target_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_target(var_2127);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_launch_template_license_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::LaunchTemplateLicenseConfiguration>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateLicenseList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_license_configuration(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_launch_template_hibernation_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateHibernationOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateHibernationOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("configured") /* Configured com.amazonaws.ec2#LaunchTemplateHibernationOptions$Configured */ => {
let var_2128 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_configured(var_2128);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_instance_metadata_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateInstanceMetadataOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateInstanceMetadataOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#LaunchTemplateInstanceMetadataOptions$State */ => {
let var_2129 =
Some(
Result::<crate::model::LaunchTemplateInstanceMetadataOptionsState, smithy_xml::decode::XmlError>::Ok(
crate::model::LaunchTemplateInstanceMetadataOptionsState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2129);
}
,
s if s.matches("httpTokens") /* HttpTokens com.amazonaws.ec2#LaunchTemplateInstanceMetadataOptions$HttpTokens */ => {
let var_2130 =
Some(
Result::<crate::model::LaunchTemplateHttpTokensState, smithy_xml::decode::XmlError>::Ok(
crate::model::LaunchTemplateHttpTokensState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_tokens(var_2130);
}
,
s if s.matches("httpPutResponseHopLimit") /* HttpPutResponseHopLimit com.amazonaws.ec2#LaunchTemplateInstanceMetadataOptions$HttpPutResponseHopLimit */ => {
let var_2131 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_http_put_response_hop_limit(var_2131);
}
,
s if s.matches("httpEndpoint") /* HttpEndpoint com.amazonaws.ec2#LaunchTemplateInstanceMetadataOptions$HttpEndpoint */ => {
let var_2132 =
Some(
Result::<crate::model::LaunchTemplateInstanceMetadataEndpointState, smithy_xml::decode::XmlError>::Ok(
crate::model::LaunchTemplateInstanceMetadataEndpointState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_http_endpoint(var_2132);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_enclave_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateEnclaveOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateEnclaveOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#LaunchTemplateEnclaveOptions$Enabled */ => {
let var_2133 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2133);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_prefix_list_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrefixListAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrefixListAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#PrefixListAssociation$ResourceId */ => {
let var_2134 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2134);
}
,
s if s.matches("resourceOwner") /* ResourceOwner com.amazonaws.ec2#PrefixListAssociation$ResourceOwner */ => {
let var_2135 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_owner(var_2135);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_prefix_list_entry(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrefixListEntry, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrefixListEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#PrefixListEntry$Cidr */ => {
let var_2136 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_2136);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#PrefixListEntry$Description */ => {
let var_2137 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2137);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instance_reservation_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstanceReservationValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstanceReservationValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservationValue") /* ReservationValue com.amazonaws.ec2#ReservedInstanceReservationValue$ReservationValue */ => {
let var_2138 =
Some(
crate::xml_deser::deser_structure_reservation_value(&mut tag)
?
)
;
builder = builder.set_reservation_value(var_2138);
}
,
s if s.matches("reservedInstanceId") /* ReservedInstanceId com.amazonaws.ec2#ReservedInstanceReservationValue$ReservedInstanceId */ => {
let var_2139 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instance_id(var_2139);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_target_reservation_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetReservationValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetReservationValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservationValue") /* ReservationValue com.amazonaws.ec2#TargetReservationValue$ReservationValue */ => {
let var_2140 =
Some(
crate::xml_deser::deser_structure_reservation_value(&mut tag)
?
)
;
builder = builder.set_reservation_value(var_2140);
}
,
s if s.matches("targetConfiguration") /* TargetConfiguration com.amazonaws.ec2#TargetReservationValue$TargetConfiguration */ => {
let var_2141 =
Some(
crate::xml_deser::deser_structure_target_configuration(&mut tag)
?
)
;
builder = builder.set_target_configuration(var_2141);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_attachment_propagation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAttachmentPropagation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayAttachmentPropagation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayAttachmentPropagation$TransitGatewayRouteTableId */ => {
let var_2142 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_2142);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayAttachmentPropagation$State */ => {
let var_2143 =
Some(
Result::<crate::model::TransitGatewayPropagationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayPropagationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2143);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_domain_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastDomainAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastDomainAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociation$TransitGatewayAttachmentId */ => {
let var_2144 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2144);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociation$ResourceId */ => {
let var_2145 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2145);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayMulticastDomainAssociation$ResourceType */ => {
let var_2146 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2146);
}
,
s if s.matches("resourceOwnerId") /* ResourceOwnerId com.amazonaws.ec2#TransitGatewayMulticastDomainAssociation$ResourceOwnerId */ => {
let var_2147 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_owner_id(var_2147);
}
,
s if s.matches("subnet") /* Subnet com.amazonaws.ec2#TransitGatewayMulticastDomainAssociation$Subnet */ => {
let var_2148 =
Some(
crate::xml_deser::deser_structure_subnet_association(&mut tag)
?
)
;
builder = builder.set_subnet(var_2148);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_route_table_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayRouteTableAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayRouteTableAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayRouteTableAssociation$TransitGatewayAttachmentId */ => {
let var_2149 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2149);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayRouteTableAssociation$ResourceId */ => {
let var_2150 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2150);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayRouteTableAssociation$ResourceType */ => {
let var_2151 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2151);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayRouteTableAssociation$State */ => {
let var_2152 =
Some(
Result::<crate::model::TransitGatewayAssociationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAssociationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2152);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_route_table_propagation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayRouteTablePropagation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayRouteTablePropagation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayRouteTablePropagation$TransitGatewayAttachmentId */ => {
let var_2153 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2153);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayRouteTablePropagation$ResourceId */ => {
let var_2154 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2154);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayRouteTablePropagation$ResourceType */ => {
let var_2155 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2155);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayRouteTablePropagation$State */ => {
let var_2156 =
Some(
Result::<crate::model::TransitGatewayPropagationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayPropagationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2156);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_snapshot_detail(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SnapshotDetail, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SnapshotDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#SnapshotDetail$Description */ => {
let var_2157 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2157);
}
,
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#SnapshotDetail$DeviceName */ => {
let var_2158 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_name(var_2158);
}
,
s if s.matches("diskImageSize") /* DiskImageSize com.amazonaws.ec2#SnapshotDetail$DiskImageSize */ => {
let var_2159 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_disk_image_size(var_2159);
}
,
s if s.matches("format") /* Format com.amazonaws.ec2#SnapshotDetail$Format */ => {
let var_2160 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_format(var_2160);
}
,
s if s.matches("progress") /* Progress com.amazonaws.ec2#SnapshotDetail$Progress */ => {
let var_2161 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_progress(var_2161);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#SnapshotDetail$SnapshotId */ => {
let var_2162 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2162);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#SnapshotDetail$Status */ => {
let var_2163 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_2163);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#SnapshotDetail$StatusMessage */ => {
let var_2164 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_2164);
}
,
s if s.matches("url") /* Url com.amazonaws.ec2#SnapshotDetail$Url */ => {
let var_2165 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_url(var_2165);
}
,
s if s.matches("userBucket") /* UserBucket com.amazonaws.ec2#SnapshotDetail$UserBucket */ => {
let var_2166 =
Some(
crate::xml_deser::deser_structure_user_bucket_details(&mut tag)
?
)
;
builder = builder.set_user_bucket(var_2166);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_import_image_license_configuration_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportImageLicenseConfigurationResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportImageLicenseConfigurationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("licenseConfigurationArn") /* LicenseConfigurationArn com.amazonaws.ec2#ImportImageLicenseConfigurationResponse$LicenseConfigurationArn */ => {
let var_2167 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_license_configuration_arn(var_2167);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_import_instance_task_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportInstanceTaskDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportInstanceTaskDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#ImportInstanceTaskDetails$Description */ => {
let var_2168 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2168);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#ImportInstanceTaskDetails$InstanceId */ => {
let var_2169 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2169);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ImportInstanceTaskDetails$Platform */ => {
let var_2170 =
Some(
Result::<crate::model::PlatformValues, smithy_xml::decode::XmlError>::Ok(
crate::model::PlatformValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_platform(var_2170);
}
,
s if s.matches("volumes") /* Volumes com.amazonaws.ec2#ImportInstanceTaskDetails$Volumes */ => {
let var_2171 =
Some(
crate::xml_deser::deser_list_import_instance_volume_detail_set(&mut tag)
?
)
;
builder = builder.set_volumes(var_2171);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_import_volume_task_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportVolumeTaskDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportVolumeTaskDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ImportVolumeTaskDetails$AvailabilityZone */ => {
let var_2172 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2172);
}
,
s if s.matches("bytesConverted") /* BytesConverted com.amazonaws.ec2#ImportVolumeTaskDetails$BytesConverted */ => {
let var_2173 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_bytes_converted(var_2173);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ImportVolumeTaskDetails$Description */ => {
let var_2174 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2174);
}
,
s if s.matches("image") /* Image com.amazonaws.ec2#ImportVolumeTaskDetails$Image */ => {
let var_2175 =
Some(
crate::xml_deser::deser_structure_disk_image_description(&mut tag)
?
)
;
builder = builder.set_image(var_2175);
}
,
s if s.matches("volume") /* Volume com.amazonaws.ec2#ImportVolumeTaskDetails$Volume */ => {
let var_2176 =
Some(
crate::xml_deser::deser_structure_disk_image_volume_description(&mut tag)
?
)
;
builder = builder.set_volume(var_2176);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_user_bucket_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::UserBucketDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::UserBucketDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("s3Bucket") /* S3Bucket com.amazonaws.ec2#UserBucketDetails$S3Bucket */ => {
let var_2177 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_bucket(var_2177);
}
,
s if s.matches("s3Key") /* S3Key com.amazonaws.ec2#UserBucketDetails$S3Key */ => {
let var_2178 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_s3_key(var_2178);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ptr_update_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PtrUpdateStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PtrUpdateStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#PtrUpdateStatus$Value */ => {
let var_2179 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2179);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#PtrUpdateStatus$Status */ => {
let var_2180 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_2180);
}
,
s if s.matches("reason") /* Reason com.amazonaws.ec2#PtrUpdateStatus$Reason */ => {
let var_2181 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reason(var_2181);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_successful_instance_credit_specification_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SuccessfulInstanceCreditSpecificationItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SuccessfulInstanceCreditSpecificationItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#SuccessfulInstanceCreditSpecificationItem$InstanceId */ => {
let var_2182 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2182);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_unsuccessful_instance_credit_specification_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::UnsuccessfulInstanceCreditSpecificationItem, smithy_xml::decode::XmlError>
{
#[allow(unused_mut)]
let mut builder = crate::model::UnsuccessfulInstanceCreditSpecificationItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#UnsuccessfulInstanceCreditSpecificationItem$InstanceId */ => {
let var_2183 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2183);
}
,
s if s.matches("error") /* Error com.amazonaws.ec2#UnsuccessfulInstanceCreditSpecificationItem$Error */ => {
let var_2184 =
Some(
crate::xml_deser::deser_structure_unsuccessful_instance_credit_specification_item_error(&mut tag)
?
)
;
builder = builder.set_error(var_2184);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_monitoring(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceMonitoring, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceMonitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceMonitoring$InstanceId */ => {
let var_2185 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2185);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#InstanceMonitoring$Monitoring */ => {
let var_2186 =
Some(
crate::xml_deser::deser_structure_monitoring(&mut tag)
?
)
;
builder = builder.set_monitoring(var_2186);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ip_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IpPermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IpPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#IpPermission$FromPort */ => {
let var_2187 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_from_port(var_2187);
}
,
s if s.matches("ipProtocol") /* IpProtocol com.amazonaws.ec2#IpPermission$IpProtocol */ => {
let var_2188 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_protocol(var_2188);
}
,
s if s.matches("ipRanges") /* IpRanges com.amazonaws.ec2#IpPermission$IpRanges */ => {
let var_2189 =
Some(
crate::xml_deser::deser_list_ip_range_list(&mut tag)
?
)
;
builder = builder.set_ip_ranges(var_2189);
}
,
s if s.matches("ipv6Ranges") /* Ipv6Ranges com.amazonaws.ec2#IpPermission$Ipv6Ranges */ => {
let var_2190 =
Some(
crate::xml_deser::deser_list_ipv6_range_list(&mut tag)
?
)
;
builder = builder.set_ipv6_ranges(var_2190);
}
,
s if s.matches("prefixListIds") /* PrefixListIds com.amazonaws.ec2#IpPermission$PrefixListIds */ => {
let var_2191 =
Some(
crate::xml_deser::deser_list_prefix_list_id_list(&mut tag)
?
)
;
builder = builder.set_prefix_list_ids(var_2191);
}
,
s if s.matches("toPort") /* ToPort com.amazonaws.ec2#IpPermission$ToPort */ => {
let var_2192 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_to_port(var_2192);
}
,
s if s.matches("groups") /* UserIdGroupPairs com.amazonaws.ec2#IpPermission$UserIdGroupPairs */ => {
let var_2193 =
Some(
crate::xml_deser::deser_list_user_id_group_pair_list(&mut tag)
?
)
;
builder = builder.set_user_id_group_pairs(var_2193);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Instance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Instance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amiLaunchIndex") /* AmiLaunchIndex com.amazonaws.ec2#Instance$AmiLaunchIndex */ => {
let var_2194 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ami_launch_index(var_2194);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#Instance$ImageId */ => {
let var_2195 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_2195);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#Instance$InstanceId */ => {
let var_2196 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2196);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#Instance$InstanceType */ => {
let var_2197 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2197);
}
,
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#Instance$KernelId */ => {
let var_2198 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kernel_id(var_2198);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#Instance$KeyName */ => {
let var_2199 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_2199);
}
,
s if s.matches("launchTime") /* LaunchTime com.amazonaws.ec2#Instance$LaunchTime */ => {
let var_2200 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_launch_time(var_2200);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#Instance$Monitoring */ => {
let var_2201 =
Some(
crate::xml_deser::deser_structure_monitoring(&mut tag)
?
)
;
builder = builder.set_monitoring(var_2201);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#Instance$Placement */ => {
let var_2202 =
Some(
crate::xml_deser::deser_structure_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_2202);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#Instance$Platform */ => {
let var_2203 =
Some(
Result::<crate::model::PlatformValues, smithy_xml::decode::XmlError>::Ok(
crate::model::PlatformValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_platform(var_2203);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#Instance$PrivateDnsName */ => {
let var_2204 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2204);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#Instance$PrivateIpAddress */ => {
let var_2205 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2205);
}
,
s if s.matches("productCodes") /* ProductCodes com.amazonaws.ec2#Instance$ProductCodes */ => {
let var_2206 =
Some(
crate::xml_deser::deser_list_product_code_list(&mut tag)
?
)
;
builder = builder.set_product_codes(var_2206);
}
,
s if s.matches("dnsName") /* PublicDnsName com.amazonaws.ec2#Instance$PublicDnsName */ => {
let var_2207 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_dns_name(var_2207);
}
,
s if s.matches("ipAddress") /* PublicIpAddress com.amazonaws.ec2#Instance$PublicIpAddress */ => {
let var_2208 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip_address(var_2208);
}
,
s if s.matches("ramdiskId") /* RamdiskId com.amazonaws.ec2#Instance$RamdiskId */ => {
let var_2209 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ramdisk_id(var_2209);
}
,
s if s.matches("instanceState") /* State com.amazonaws.ec2#Instance$State */ => {
let var_2210 =
Some(
crate::xml_deser::deser_structure_instance_state(&mut tag)
?
)
;
builder = builder.set_state(var_2210);
}
,
s if s.matches("reason") /* StateTransitionReason com.amazonaws.ec2#Instance$StateTransitionReason */ => {
let var_2211 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state_transition_reason(var_2211);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#Instance$SubnetId */ => {
let var_2212 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2212);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#Instance$VpcId */ => {
let var_2213 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2213);
}
,
s if s.matches("architecture") /* Architecture com.amazonaws.ec2#Instance$Architecture */ => {
let var_2214 =
Some(
Result::<crate::model::ArchitectureValues, smithy_xml::decode::XmlError>::Ok(
crate::model::ArchitectureValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_architecture(var_2214);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#Instance$BlockDeviceMappings */ => {
let var_2215 =
Some(
crate::xml_deser::deser_list_instance_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_2215);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#Instance$ClientToken */ => {
let var_2216 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_2216);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#Instance$EbsOptimized */ => {
let var_2217 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_2217);
}
,
s if s.matches("enaSupport") /* EnaSupport com.amazonaws.ec2#Instance$EnaSupport */ => {
let var_2218 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ena_support(var_2218);
}
,
s if s.matches("hypervisor") /* Hypervisor com.amazonaws.ec2#Instance$Hypervisor */ => {
let var_2219 =
Some(
Result::<crate::model::HypervisorType, smithy_xml::decode::XmlError>::Ok(
crate::model::HypervisorType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_hypervisor(var_2219);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#Instance$IamInstanceProfile */ => {
let var_2220 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_2220);
}
,
s if s.matches("instanceLifecycle") /* InstanceLifecycle com.amazonaws.ec2#Instance$InstanceLifecycle */ => {
let var_2221 =
Some(
Result::<crate::model::InstanceLifecycleType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceLifecycleType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_lifecycle(var_2221);
}
,
s if s.matches("elasticGpuAssociationSet") /* ElasticGpuAssociations com.amazonaws.ec2#Instance$ElasticGpuAssociations */ => {
let var_2222 =
Some(
crate::xml_deser::deser_list_elastic_gpu_association_list(&mut tag)
?
)
;
builder = builder.set_elastic_gpu_associations(var_2222);
}
,
s if s.matches("elasticInferenceAcceleratorAssociationSet") /* ElasticInferenceAcceleratorAssociations com.amazonaws.ec2#Instance$ElasticInferenceAcceleratorAssociations */ => {
let var_2223 =
Some(
crate::xml_deser::deser_list_elastic_inference_accelerator_association_list(&mut tag)
?
)
;
builder = builder.set_elastic_inference_accelerator_associations(var_2223);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#Instance$NetworkInterfaces */ => {
let var_2224 =
Some(
crate::xml_deser::deser_list_instance_network_interface_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_2224);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#Instance$OutpostArn */ => {
let var_2225 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_2225);
}
,
s if s.matches("rootDeviceName") /* RootDeviceName com.amazonaws.ec2#Instance$RootDeviceName */ => {
let var_2226 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_root_device_name(var_2226);
}
,
s if s.matches("rootDeviceType") /* RootDeviceType com.amazonaws.ec2#Instance$RootDeviceType */ => {
let var_2227 =
Some(
Result::<crate::model::DeviceType, smithy_xml::decode::XmlError>::Ok(
crate::model::DeviceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_root_device_type(var_2227);
}
,
s if s.matches("groupSet") /* SecurityGroups com.amazonaws.ec2#Instance$SecurityGroups */ => {
let var_2228 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_2228);
}
,
s if s.matches("sourceDestCheck") /* SourceDestCheck com.amazonaws.ec2#Instance$SourceDestCheck */ => {
let var_2229 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_source_dest_check(var_2229);
}
,
s if s.matches("spotInstanceRequestId") /* SpotInstanceRequestId com.amazonaws.ec2#Instance$SpotInstanceRequestId */ => {
let var_2230 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_instance_request_id(var_2230);
}
,
s if s.matches("sriovNetSupport") /* SriovNetSupport com.amazonaws.ec2#Instance$SriovNetSupport */ => {
let var_2231 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_sriov_net_support(var_2231);
}
,
s if s.matches("stateReason") /* StateReason com.amazonaws.ec2#Instance$StateReason */ => {
let var_2232 =
Some(
crate::xml_deser::deser_structure_state_reason(&mut tag)
?
)
;
builder = builder.set_state_reason(var_2232);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#Instance$Tags */ => {
let var_2233 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2233);
}
,
s if s.matches("virtualizationType") /* VirtualizationType com.amazonaws.ec2#Instance$VirtualizationType */ => {
let var_2234 =
Some(
Result::<crate::model::VirtualizationType, smithy_xml::decode::XmlError>::Ok(
crate::model::VirtualizationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_virtualization_type(var_2234);
}
,
s if s.matches("cpuOptions") /* CpuOptions com.amazonaws.ec2#Instance$CpuOptions */ => {
let var_2235 =
Some(
crate::xml_deser::deser_structure_cpu_options(&mut tag)
?
)
;
builder = builder.set_cpu_options(var_2235);
}
,
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#Instance$CapacityReservationId */ => {
let var_2236 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_2236);
}
,
s if s.matches("capacityReservationSpecification") /* CapacityReservationSpecification com.amazonaws.ec2#Instance$CapacityReservationSpecification */ => {
let var_2237 =
Some(
crate::xml_deser::deser_structure_capacity_reservation_specification_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_specification(var_2237);
}
,
s if s.matches("hibernationOptions") /* HibernationOptions com.amazonaws.ec2#Instance$HibernationOptions */ => {
let var_2238 =
Some(
crate::xml_deser::deser_structure_hibernation_options(&mut tag)
?
)
;
builder = builder.set_hibernation_options(var_2238);
}
,
s if s.matches("licenseSet") /* Licenses com.amazonaws.ec2#Instance$Licenses */ => {
let var_2239 =
Some(
crate::xml_deser::deser_list_license_list(&mut tag)
?
)
;
builder = builder.set_licenses(var_2239);
}
,
s if s.matches("metadataOptions") /* MetadataOptions com.amazonaws.ec2#Instance$MetadataOptions */ => {
let var_2240 =
Some(
crate::xml_deser::deser_structure_instance_metadata_options_response(&mut tag)
?
)
;
builder = builder.set_metadata_options(var_2240);
}
,
s if s.matches("enclaveOptions") /* EnclaveOptions com.amazonaws.ec2#Instance$EnclaveOptions */ => {
let var_2241 =
Some(
crate::xml_deser::deser_structure_enclave_options(&mut tag)
?
)
;
builder = builder.set_enclave_options(var_2241);
}
,
s if s.matches("bootMode") /* BootMode com.amazonaws.ec2#Instance$BootMode */ => {
let var_2242 =
Some(
Result::<crate::model::BootModeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::BootModeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_boot_mode(var_2242);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_multicast_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayMulticastGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayMulticastGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupIpAddress") /* GroupIpAddress com.amazonaws.ec2#TransitGatewayMulticastGroup$GroupIpAddress */ => {
let var_2243 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_ip_address(var_2243);
}
,
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayMulticastGroup$TransitGatewayAttachmentId */ => {
let var_2244 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2244);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#TransitGatewayMulticastGroup$SubnetId */ => {
let var_2245 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2245);
}
,
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayMulticastGroup$ResourceId */ => {
let var_2246 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2246);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayMulticastGroup$ResourceType */ => {
let var_2247 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2247);
}
,
s if s.matches("resourceOwnerId") /* ResourceOwnerId com.amazonaws.ec2#TransitGatewayMulticastGroup$ResourceOwnerId */ => {
let var_2248 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_owner_id(var_2248);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#TransitGatewayMulticastGroup$NetworkInterfaceId */ => {
let var_2249 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2249);
}
,
s if s.matches("groupMember") /* GroupMember com.amazonaws.ec2#TransitGatewayMulticastGroup$GroupMember */ => {
let var_2250 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_group_member(var_2250);
}
,
s if s.matches("groupSource") /* GroupSource com.amazonaws.ec2#TransitGatewayMulticastGroup$GroupSource */ => {
let var_2251 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_group_source(var_2251);
}
,
s if s.matches("memberType") /* MemberType com.amazonaws.ec2#TransitGatewayMulticastGroup$MemberType */ => {
let var_2252 =
Some(
Result::<crate::model::MembershipType, smithy_xml::decode::XmlError>::Ok(
crate::model::MembershipType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_member_type(var_2252);
}
,
s if s.matches("sourceType") /* SourceType com.amazonaws.ec2#TransitGatewayMulticastGroup$SourceType */ => {
let var_2253 =
Some(
Result::<crate::model::MembershipType, smithy_xml::decode::XmlError>::Ok(
crate::model::MembershipType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_source_type(var_2253);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_state_change(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStateChange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStateChange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("currentState") /* CurrentState com.amazonaws.ec2#InstanceStateChange$CurrentState */ => {
let var_2254 =
Some(
crate::xml_deser::deser_structure_instance_state(&mut tag)
?
)
;
builder = builder.set_current_state(var_2254);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceStateChange$InstanceId */ => {
let var_2255 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2255);
}
,
s if s.matches("previousState") /* PreviousState com.amazonaws.ec2#InstanceStateChange$PreviousState */ => {
let var_2256 =
Some(
crate::xml_deser::deser_structure_instance_state(&mut tag)
?
)
;
builder = builder.set_previous_state(var_2256);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_arn_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ArnList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_path_component_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PathComponent>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PathComponentList$member */ => {
out.push(
crate::xml_deser::deser_structure_path_component(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_explanation_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Explanation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ExplanationList$member */ => {
out.push(
crate::xml_deser::deser_structure_explanation(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_alternate_path_hint_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AlternatePathHint>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AlternatePathHintList$member */ => {
out.push(
crate::xml_deser::deser_structure_alternate_path_hint(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_terminate_connection_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TerminateConnectionStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TerminateConnectionStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("connectionId") /* ConnectionId com.amazonaws.ec2#TerminateConnectionStatus$ConnectionId */ => {
let var_2257 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_connection_id(var_2257);
}
,
s if s.matches("previousStatus") /* PreviousStatus com.amazonaws.ec2#TerminateConnectionStatus$PreviousStatus */ => {
let var_2258 =
Some(
crate::xml_deser::deser_structure_client_vpn_connection_status(&mut tag)
?
)
;
builder = builder.set_previous_status(var_2258);
}
,
s if s.matches("currentStatus") /* CurrentStatus com.amazonaws.ec2#TerminateConnectionStatus$CurrentStatus */ => {
let var_2259 =
Some(
crate::xml_deser::deser_structure_client_vpn_connection_status(&mut tag)
?
)
;
builder = builder.set_current_status(var_2259);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_subnet_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SubnetAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SubnetAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#SubnetAssociation$SubnetId */ => {
let var_2260 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2260);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#SubnetAssociation$State */ => {
let var_2261 =
Some(
Result::<crate::model::TransitGatewayMulitcastDomainAssociationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayMulitcastDomainAssociationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2261);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_unsuccessful_item_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::UnsuccessfulItemError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::UnsuccessfulItemError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#UnsuccessfulItemError$Code */ => {
let var_2262 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2262);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#UnsuccessfulItemError$Message */ => {
let var_2263 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2263);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_ipv6_cidr_block_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6CidrBlock>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6CidrBlockSet$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_cidr_block(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_cidr_block_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::CidrBlock>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CidrBlockSet$member */ => {
out.push(
crate::xml_deser::deser_structure_cidr_block(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_vpc_peering_connection_options_description(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpcPeeringConnectionOptionsDescription, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpcPeeringConnectionOptionsDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allowDnsResolutionFromRemoteVpc") /* AllowDnsResolutionFromRemoteVpc com.amazonaws.ec2#VpcPeeringConnectionOptionsDescription$AllowDnsResolutionFromRemoteVpc */ => {
let var_2264 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_dns_resolution_from_remote_vpc(var_2264);
}
,
s if s.matches("allowEgressFromLocalClassicLinkToRemoteVpc") /* AllowEgressFromLocalClassicLinkToRemoteVpc com.amazonaws.ec2#VpcPeeringConnectionOptionsDescription$AllowEgressFromLocalClassicLinkToRemoteVpc */ => {
let var_2265 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_egress_from_local_classic_link_to_remote_vpc(var_2265);
}
,
s if s.matches("allowEgressFromLocalVpcToRemoteClassicLink") /* AllowEgressFromLocalVpcToRemoteClassicLink com.amazonaws.ec2#VpcPeeringConnectionOptionsDescription$AllowEgressFromLocalVpcToRemoteClassicLink */ => {
let var_2266 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_allow_egress_from_local_vpc_to_remote_classic_link(var_2266);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_event_window_time_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceEventWindowTimeRange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceEventWindowTimeRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("startWeekDay") /* StartWeekDay com.amazonaws.ec2#InstanceEventWindowTimeRange$StartWeekDay */ => {
let var_2267 =
Some(
Result::<crate::model::WeekDay, smithy_xml::decode::XmlError>::Ok(
crate::model::WeekDay::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_start_week_day(var_2267);
}
,
s if s.matches("startHour") /* StartHour com.amazonaws.ec2#InstanceEventWindowTimeRange$StartHour */ => {
let var_2268 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Hour`)"))
}
?
)
;
builder = builder.set_start_hour(var_2268);
}
,
s if s.matches("endWeekDay") /* EndWeekDay com.amazonaws.ec2#InstanceEventWindowTimeRange$EndWeekDay */ => {
let var_2269 =
Some(
Result::<crate::model::WeekDay, smithy_xml::decode::XmlError>::Ok(
crate::model::WeekDay::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_end_week_day(var_2269);
}
,
s if s.matches("endHour") /* EndHour com.amazonaws.ec2#InstanceEventWindowTimeRange$EndHour */ => {
let var_2270 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Hour`)"))
}
?
)
;
builder = builder.set_end_hour(var_2270);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_id_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIdList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_dedicated_host_id_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DedicatedHostIdList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_referenced_security_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReferencedSecurityGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReferencedSecurityGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#ReferencedSecurityGroup$GroupId */ => {
let var_2271 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_2271);
}
,
s if s.matches("peeringStatus") /* PeeringStatus com.amazonaws.ec2#ReferencedSecurityGroup$PeeringStatus */ => {
let var_2272 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_peering_status(var_2272);
}
,
s if s.matches("userId") /* UserId com.amazonaws.ec2#ReferencedSecurityGroup$UserId */ => {
let var_2273 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_id(var_2273);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#ReferencedSecurityGroup$VpcId */ => {
let var_2274 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2274);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#ReferencedSecurityGroup$VpcPeeringConnectionId */ => {
let var_2275 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_2275);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_s3_storage(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::S3Storage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::S3Storage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("AWSAccessKeyId") /* AWSAccessKeyId com.amazonaws.ec2#S3Storage$AWSAccessKeyId */ => {
let var_2276 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_aws_access_key_id(var_2276);
}
,
s if s.matches("bucket") /* Bucket com.amazonaws.ec2#S3Storage$Bucket */ => {
let var_2277 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_bucket(var_2277);
}
,
s if s.matches("prefix") /* Prefix com.amazonaws.ec2#S3Storage$Prefix */ => {
let var_2278 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix(var_2278);
}
,
s if s.matches("uploadPolicy") /* UploadPolicy com.amazonaws.ec2#S3Storage$UploadPolicy */ => {
let var_2279 =
Some(
smithy_types::base64::decode(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|err|smithy_xml::decode::XmlError::custom(format!("invalid base64: {:?}", err))).map(smithy_types::Blob::new)
?
)
;
builder = builder.set_upload_policy(var_2279);
}
,
s if s.matches("uploadPolicySignature") /* UploadPolicySignature com.amazonaws.ec2#S3Storage$UploadPolicySignature */ => {
let var_2280 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_upload_policy_signature(var_2280);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_count_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceCount>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceCountList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_count(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_price_schedule_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PriceSchedule>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PriceScheduleList$member */ => {
out.push(
crate::xml_deser::deser_structure_price_schedule(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_cancel_spot_fleet_requests_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CancelSpotFleetRequestsError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CancelSpotFleetRequestsError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#CancelSpotFleetRequestsError$Code */ => {
let var_2281 =
Some(
Result::<crate::model::CancelBatchErrorCode, smithy_xml::decode::XmlError>::Ok(
crate::model::CancelBatchErrorCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2281);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#CancelSpotFleetRequestsError$Message */ => {
let var_2282 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2282);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_dhcp_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("key") /* Key com.amazonaws.ec2#DhcpConfiguration$Key */ => {
let var_2283 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key(var_2283);
}
,
s if s.matches("valueSet") /* Values com.amazonaws.ec2#DhcpConfiguration$Values */ => {
let var_2284 =
Some(
crate::xml_deser::deser_list_dhcp_configuration_value_list(&mut tag)
?
)
;
builder = builder.set_values(var_2284);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_internet_gateway_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InternetGatewayAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InternetGatewayAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#InternetGatewayAttachment$State */ => {
let var_2285 =
Some(
Result::<crate::model::AttachmentStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AttachmentStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2285);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#InternetGatewayAttachment$VpcId */ => {
let var_2286 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2286);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_and_overrides_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateAndOverridesResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateAndOverridesResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateSpecification") /* LaunchTemplateSpecification com.amazonaws.ec2#LaunchTemplateAndOverridesResponse$LaunchTemplateSpecification */ => {
let var_2287 =
Some(
crate::xml_deser::deser_structure_fleet_launch_template_specification(&mut tag)
?
)
;
builder = builder.set_launch_template_specification(var_2287);
}
,
s if s.matches("overrides") /* Overrides com.amazonaws.ec2#LaunchTemplateAndOverridesResponse$Overrides */ => {
let var_2288 =
Some(
crate::xml_deser::deser_structure_fleet_launch_template_overrides(&mut tag)
?
)
;
builder = builder.set_overrides(var_2288);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_ids_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIdsSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_validation_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ValidationError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ValidationError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ValidationError$Code */ => {
let var_2289 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2289);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ValidationError$Message */ => {
let var_2290 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2290);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_nat_gateway_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NatGatewayAddress, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NatGatewayAddress::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationId") /* AllocationId com.amazonaws.ec2#NatGatewayAddress$AllocationId */ => {
let var_2291 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allocation_id(var_2291);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#NatGatewayAddress$NetworkInterfaceId */ => {
let var_2292 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2292);
}
,
s if s.matches("privateIp") /* PrivateIp com.amazonaws.ec2#NatGatewayAddress$PrivateIp */ => {
let var_2293 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip(var_2293);
}
,
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#NatGatewayAddress$PublicIp */ => {
let var_2294 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_2294);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_acl_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkAclAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkAclAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkAclAssociationId") /* NetworkAclAssociationId com.amazonaws.ec2#NetworkAclAssociation$NetworkAclAssociationId */ => {
let var_2295 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_acl_association_id(var_2295);
}
,
s if s.matches("networkAclId") /* NetworkAclId com.amazonaws.ec2#NetworkAclAssociation$NetworkAclId */ => {
let var_2296 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_acl_id(var_2296);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#NetworkAclAssociation$SubnetId */ => {
let var_2297 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2297);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_acl_entry(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkAclEntry, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkAclEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#NetworkAclEntry$CidrBlock */ => {
let var_2298 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_2298);
}
,
s if s.matches("egress") /* Egress com.amazonaws.ec2#NetworkAclEntry$Egress */ => {
let var_2299 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_egress(var_2299);
}
,
s if s.matches("icmpTypeCode") /* IcmpTypeCode com.amazonaws.ec2#NetworkAclEntry$IcmpTypeCode */ => {
let var_2300 =
Some(
crate::xml_deser::deser_structure_icmp_type_code(&mut tag)
?
)
;
builder = builder.set_icmp_type_code(var_2300);
}
,
s if s.matches("ipv6CidrBlock") /* Ipv6CidrBlock com.amazonaws.ec2#NetworkAclEntry$Ipv6CidrBlock */ => {
let var_2301 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_cidr_block(var_2301);
}
,
s if s.matches("portRange") /* PortRange com.amazonaws.ec2#NetworkAclEntry$PortRange */ => {
let var_2302 =
Some(
crate::xml_deser::deser_structure_port_range(&mut tag)
?
)
;
builder = builder.set_port_range(var_2302);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#NetworkAclEntry$Protocol */ => {
let var_2303 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_2303);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#NetworkAclEntry$RuleAction */ => {
let var_2304 =
Some(
Result::<crate::model::RuleAction, smithy_xml::decode::XmlError>::Ok(
crate::model::RuleAction::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_rule_action(var_2304);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#NetworkAclEntry$RuleNumber */ => {
let var_2305 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rule_number(var_2305);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_interface_ipv6_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfaceIpv6Address, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfaceIpv6Address::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Address") /* Ipv6Address com.amazonaws.ec2#NetworkInterfaceIpv6Address$Ipv6Address */ => {
let var_2306 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_address(var_2306);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_interface_private_ip_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInterfacePrivateIpAddress, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInterfacePrivateIpAddress::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#NetworkInterfacePrivateIpAddress$Association */ => {
let var_2307 =
Some(
crate::xml_deser::deser_structure_network_interface_association(&mut tag)
?
)
;
builder = builder.set_association(var_2307);
}
,
s if s.matches("primary") /* Primary com.amazonaws.ec2#NetworkInterfacePrivateIpAddress$Primary */ => {
let var_2308 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_primary(var_2308);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#NetworkInterfacePrivateIpAddress$PrivateDnsName */ => {
let var_2309 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2309);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#NetworkInterfacePrivateIpAddress$PrivateIpAddress */ => {
let var_2310 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2310);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_prefix_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6PrefixSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6PrefixSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Prefix") /* Ipv6Prefix com.amazonaws.ec2#Ipv6PrefixSpecification$Ipv6Prefix */ => {
let var_2311 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_prefix(var_2311);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_route_table_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RouteTableAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::RouteTableAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("main") /* Main com.amazonaws.ec2#RouteTableAssociation$Main */ => {
let var_2312 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_main(var_2312);
}
,
s if s.matches("routeTableAssociationId") /* RouteTableAssociationId com.amazonaws.ec2#RouteTableAssociation$RouteTableAssociationId */ => {
let var_2313 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_route_table_association_id(var_2313);
}
,
s if s.matches("routeTableId") /* RouteTableId com.amazonaws.ec2#RouteTableAssociation$RouteTableId */ => {
let var_2314 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_route_table_id(var_2314);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#RouteTableAssociation$SubnetId */ => {
let var_2315 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2315);
}
,
s if s.matches("gatewayId") /* GatewayId com.amazonaws.ec2#RouteTableAssociation$GatewayId */ => {
let var_2316 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_gateway_id(var_2316);
}
,
s if s.matches("associationState") /* AssociationState com.amazonaws.ec2#RouteTableAssociation$AssociationState */ => {
let var_2317 =
Some(
crate::xml_deser::deser_structure_route_table_association_state(&mut tag)
?
)
;
builder = builder.set_association_state(var_2317);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_propagating_vgw(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PropagatingVgw, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PropagatingVgw::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("gatewayId") /* GatewayId com.amazonaws.ec2#PropagatingVgw$GatewayId */ => {
let var_2318 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_gateway_id(var_2318);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Route, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Route::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#Route$DestinationCidrBlock */ => {
let var_2319 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr_block(var_2319);
}
,
s if s.matches("destinationIpv6CidrBlock") /* DestinationIpv6CidrBlock com.amazonaws.ec2#Route$DestinationIpv6CidrBlock */ => {
let var_2320 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_ipv6_cidr_block(var_2320);
}
,
s if s.matches("destinationPrefixListId") /* DestinationPrefixListId com.amazonaws.ec2#Route$DestinationPrefixListId */ => {
let var_2321 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_prefix_list_id(var_2321);
}
,
s if s.matches("egressOnlyInternetGatewayId") /* EgressOnlyInternetGatewayId com.amazonaws.ec2#Route$EgressOnlyInternetGatewayId */ => {
let var_2322 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_egress_only_internet_gateway_id(var_2322);
}
,
s if s.matches("gatewayId") /* GatewayId com.amazonaws.ec2#Route$GatewayId */ => {
let var_2323 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_gateway_id(var_2323);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#Route$InstanceId */ => {
let var_2324 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2324);
}
,
s if s.matches("instanceOwnerId") /* InstanceOwnerId com.amazonaws.ec2#Route$InstanceOwnerId */ => {
let var_2325 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_owner_id(var_2325);
}
,
s if s.matches("natGatewayId") /* NatGatewayId com.amazonaws.ec2#Route$NatGatewayId */ => {
let var_2326 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_nat_gateway_id(var_2326);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#Route$TransitGatewayId */ => {
let var_2327 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_2327);
}
,
s if s.matches("localGatewayId") /* LocalGatewayId com.amazonaws.ec2#Route$LocalGatewayId */ => {
let var_2328 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_local_gateway_id(var_2328);
}
,
s if s.matches("carrierGatewayId") /* CarrierGatewayId com.amazonaws.ec2#Route$CarrierGatewayId */ => {
let var_2329 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_gateway_id(var_2329);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#Route$NetworkInterfaceId */ => {
let var_2330 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2330);
}
,
s if s.matches("origin") /* Origin com.amazonaws.ec2#Route$Origin */ => {
let var_2331 =
Some(
Result::<crate::model::RouteOrigin, smithy_xml::decode::XmlError>::Ok(
crate::model::RouteOrigin::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_origin(var_2331);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Route$State */ => {
let var_2332 =
Some(
Result::<crate::model::RouteState, smithy_xml::decode::XmlError>::Ok(
crate::model::RouteState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2332);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#Route$VpcPeeringConnectionId */ => {
let var_2333 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_2333);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_inside_cidr_blocks_string_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InsideCidrBlocksStringList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_transit_gateway_attachment_bgp_configuration_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::TransitGatewayAttachmentBgpConfiguration>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TransitGatewayAttachmentBgpConfigurationList$member */ => {
out.push(
crate::xml_deser::deser_structure_transit_gateway_attachment_bgp_configuration(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_transit_gateway_route_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayRouteAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayRouteAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("resourceId") /* ResourceId com.amazonaws.ec2#TransitGatewayRouteAttachment$ResourceId */ => {
let var_2334 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_resource_id(var_2334);
}
,
s if s.matches("transitGatewayAttachmentId") /* TransitGatewayAttachmentId com.amazonaws.ec2#TransitGatewayRouteAttachment$TransitGatewayAttachmentId */ => {
let var_2335 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_attachment_id(var_2335);
}
,
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TransitGatewayRouteAttachment$ResourceType */ => {
let var_2336 =
Some(
Result::<crate::model::TransitGatewayAttachmentResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAttachmentResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2336);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_security_group_identifier(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SecurityGroupIdentifier, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SecurityGroupIdentifier::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#SecurityGroupIdentifier$GroupId */ => {
let var_2337 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_2337);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SecurityGroupIdentifier$GroupName */ => {
let var_2338 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2338);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_dns_entry(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DnsEntry, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DnsEntry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dnsName") /* DnsName com.amazonaws.ec2#DnsEntry$DnsName */ => {
let var_2339 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dns_name(var_2339);
}
,
s if s.matches("hostedZoneId") /* HostedZoneId com.amazonaws.ec2#DnsEntry$HostedZoneId */ => {
let var_2340 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_hosted_zone_id(var_2340);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_service_type_detail(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ServiceTypeDetail, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ServiceTypeDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("serviceType") /* ServiceType com.amazonaws.ec2#ServiceTypeDetail$ServiceType */ => {
let var_2341 =
Some(
Result::<crate::model::ServiceType, smithy_xml::decode::XmlError>::Ok(
crate::model::ServiceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_service_type(var_2341);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_tunnel_options_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TunnelOption>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TunnelOptionsList$member */ => {
out.push(
crate::xml_deser::deser_structure_tunnel_option(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_vpn_static_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VpnStaticRoute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VpnStaticRoute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationCidrBlock") /* DestinationCidrBlock com.amazonaws.ec2#VpnStaticRoute$DestinationCidrBlock */ => {
let var_2342 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr_block(var_2342);
}
,
s if s.matches("source") /* Source com.amazonaws.ec2#VpnStaticRoute$Source */ => {
let var_2343 =
Some(
Result::<crate::model::VpnStaticRouteSource, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnStaticRouteSource::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_source(var_2343);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#VpnStaticRoute$State */ => {
let var_2344 =
Some(
Result::<crate::model::VpnState, smithy_xml::decode::XmlError>::Ok(
crate::model::VpnState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2344);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_vgw_telemetry(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VgwTelemetry, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VgwTelemetry::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("acceptedRouteCount") /* AcceptedRouteCount com.amazonaws.ec2#VgwTelemetry$AcceptedRouteCount */ => {
let var_2345 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_accepted_route_count(var_2345);
}
,
s if s.matches("lastStatusChange") /* LastStatusChange com.amazonaws.ec2#VgwTelemetry$LastStatusChange */ => {
let var_2346 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_last_status_change(var_2346);
}
,
s if s.matches("outsideIpAddress") /* OutsideIpAddress com.amazonaws.ec2#VgwTelemetry$OutsideIpAddress */ => {
let var_2347 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outside_ip_address(var_2347);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#VgwTelemetry$Status */ => {
let var_2348 =
Some(
Result::<crate::model::TelemetryStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::TelemetryStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2348);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#VgwTelemetry$StatusMessage */ => {
let var_2349 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_2349);
}
,
s if s.matches("certificateArn") /* CertificateArn com.amazonaws.ec2#VgwTelemetry$CertificateArn */ => {
let var_2350 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_certificate_arn(var_2350);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_delete_fleet_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteFleetError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteFleetError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#DeleteFleetError$Code */ => {
let var_2351 =
Some(
Result::<crate::model::DeleteFleetErrorCode, smithy_xml::decode::XmlError>::Ok(
crate::model::DeleteFleetErrorCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2351);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#DeleteFleetError$Message */ => {
let var_2352 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2352);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_response_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ResponseError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ResponseError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ResponseError$Code */ => {
let var_2353 =
Some(
Result::<crate::model::LaunchTemplateErrorCode, smithy_xml::decode::XmlError>::Ok(
crate::model::LaunchTemplateErrorCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2353);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ResponseError$Message */ => {
let var_2354 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2354);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_delete_queued_reserved_instances_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DeleteQueuedReservedInstancesError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DeleteQueuedReservedInstancesError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#DeleteQueuedReservedInstancesError$Code */ => {
let var_2355 =
Some(
Result::<crate::model::DeleteQueuedReservedInstancesErrorCode, smithy_xml::decode::XmlError>::Ok(
crate::model::DeleteQueuedReservedInstancesErrorCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2355);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#DeleteQueuedReservedInstancesError$Message */ => {
let var_2356 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2356);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_account_attribute_value_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AccountAttributeValue>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AccountAttributeValueList$member */ => {
out.push(
crate::xml_deser::deser_structure_account_attribute_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_availability_zone_message_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AvailabilityZoneMessage>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AvailabilityZoneMessageList$member */ => {
out.push(
crate::xml_deser::deser_structure_availability_zone_message(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_client_vpn_connection_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnConnectionStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnConnectionStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientVpnConnectionStatus$Code */ => {
let var_2357 =
Some(
Result::<crate::model::ClientVpnConnectionStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnConnectionStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2357);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientVpnConnectionStatus$Message */ => {
let var_2358 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2358);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_associated_target_network_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AssociatedTargetNetwork>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AssociatedTargetNetworkSet$member */ => {
out.push(
crate::xml_deser::deser_structure_associated_target_network(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_client_vpn_authentication_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClientVpnAuthentication>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClientVpnAuthenticationList$member */ => {
out.push(
crate::xml_deser::deser_structure_client_vpn_authentication(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_connection_log_response_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ConnectionLogResponseOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ConnectionLogResponseOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Enabled") /* Enabled com.amazonaws.ec2#ConnectionLogResponseOptions$Enabled */ => {
let var_2359 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2359);
}
,
s if s.matches("CloudwatchLogGroup") /* CloudwatchLogGroup com.amazonaws.ec2#ConnectionLogResponseOptions$CloudwatchLogGroup */ => {
let var_2360 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cloudwatch_log_group(var_2360);
}
,
s if s.matches("CloudwatchLogStream") /* CloudwatchLogStream com.amazonaws.ec2#ConnectionLogResponseOptions$CloudwatchLogStream */ => {
let var_2361 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cloudwatch_log_stream(var_2361);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_connect_response_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientConnectResponseOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientConnectResponseOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#ClientConnectResponseOptions$Enabled */ => {
let var_2362 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2362);
}
,
s if s.matches("lambdaFunctionArn") /* LambdaFunctionArn com.amazonaws.ec2#ClientConnectResponseOptions$LambdaFunctionArn */ => {
let var_2363 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_lambda_function_arn(var_2363);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ClientConnectResponseOptions$Status */ => {
let var_2364 =
Some(
crate::xml_deser::deser_structure_client_vpn_endpoint_attribute_status(&mut tag)
?
)
;
builder = builder.set_status(var_2364);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_elastic_gpu_health(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ElasticGpuHealth, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ElasticGpuHealth::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("status") /* Status com.amazonaws.ec2#ElasticGpuHealth$Status */ => {
let var_2365 =
Some(
Result::<crate::model::ElasticGpuStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::ElasticGpuStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2365);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_event_information(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EventInformation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EventInformation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("eventDescription") /* EventDescription com.amazonaws.ec2#EventInformation$EventDescription */ => {
let var_2366 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_description(var_2366);
}
,
s if s.matches("eventSubType") /* EventSubType com.amazonaws.ec2#EventInformation$EventSubType */ => {
let var_2367 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_sub_type(var_2367);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#EventInformation$InstanceId */ => {
let var_2368 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2368);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_fleet_launch_template_config_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FleetLaunchTemplateConfig>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FleetLaunchTemplateConfigList$member */ => {
out.push(
crate::xml_deser::deser_structure_fleet_launch_template_config(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_target_capacity_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetCapacitySpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetCapacitySpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalTargetCapacity") /* TotalTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$TotalTargetCapacity */ => {
let var_2369 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_target_capacity(var_2369);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$OnDemandTargetCapacity */ => {
let var_2370 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_on_demand_target_capacity(var_2370);
}
,
s if s.matches("spotTargetCapacity") /* SpotTargetCapacity com.amazonaws.ec2#TargetCapacitySpecification$SpotTargetCapacity */ => {
let var_2371 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_spot_target_capacity(var_2371);
}
,
s if s.matches("defaultTargetCapacityType") /* DefaultTargetCapacityType com.amazonaws.ec2#TargetCapacitySpecification$DefaultTargetCapacityType */ => {
let var_2372 =
Some(
Result::<crate::model::DefaultTargetCapacityType, smithy_xml::decode::XmlError>::Ok(
crate::model::DefaultTargetCapacityType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_default_target_capacity_type(var_2372);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#SpotOptions$AllocationStrategy */ => {
let var_2373 =
Some(
Result::<crate::model::SpotAllocationStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::SpotAllocationStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2373);
}
,
s if s.matches("maintenanceStrategies") /* MaintenanceStrategies com.amazonaws.ec2#SpotOptions$MaintenanceStrategies */ => {
let var_2374 =
Some(
crate::xml_deser::deser_structure_fleet_spot_maintenance_strategies(&mut tag)
?
)
;
builder = builder.set_maintenance_strategies(var_2374);
}
,
s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#SpotOptions$InstanceInterruptionBehavior */ => {
let var_2375 =
Some(
Result::<crate::model::SpotInstanceInterruptionBehavior, smithy_xml::decode::XmlError>::Ok(
crate::model::SpotInstanceInterruptionBehavior::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_interruption_behavior(var_2375);
}
,
s if s.matches("instancePoolsToUseCount") /* InstancePoolsToUseCount com.amazonaws.ec2#SpotOptions$InstancePoolsToUseCount */ => {
let var_2376 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_pools_to_use_count(var_2376);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#SpotOptions$SingleInstanceType */ => {
let var_2377 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2377);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#SpotOptions$SingleAvailabilityZone */ => {
let var_2378 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2378);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#SpotOptions$MinTargetCapacity */ => {
let var_2379 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2379);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#SpotOptions$MaxTotalPrice */ => {
let var_2380 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_max_total_price(var_2380);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_on_demand_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::OnDemandOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::OnDemandOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#OnDemandOptions$AllocationStrategy */ => {
let var_2381 =
Some(
Result::<crate::model::FleetOnDemandAllocationStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetOnDemandAllocationStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2381);
}
,
s if s.matches("capacityReservationOptions") /* CapacityReservationOptions com.amazonaws.ec2#OnDemandOptions$CapacityReservationOptions */ => {
let var_2382 =
Some(
crate::xml_deser::deser_structure_capacity_reservation_options(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_options(var_2382);
}
,
s if s.matches("singleInstanceType") /* SingleInstanceType com.amazonaws.ec2#OnDemandOptions$SingleInstanceType */ => {
let var_2383 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_instance_type(var_2383);
}
,
s if s.matches("singleAvailabilityZone") /* SingleAvailabilityZone com.amazonaws.ec2#OnDemandOptions$SingleAvailabilityZone */ => {
let var_2384 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_single_availability_zone(var_2384);
}
,
s if s.matches("minTargetCapacity") /* MinTargetCapacity com.amazonaws.ec2#OnDemandOptions$MinTargetCapacity */ => {
let var_2385 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_min_target_capacity(var_2385);
}
,
s if s.matches("maxTotalPrice") /* MaxTotalPrice com.amazonaws.ec2#OnDemandOptions$MaxTotalPrice */ => {
let var_2386 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_max_total_price(var_2386);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_describe_fleets_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DescribeFleetError>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DescribeFleetsErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_describe_fleet_error(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_describe_fleets_instances_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DescribeFleetsInstances>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DescribeFleetsInstancesSet$member */ => {
out.push(
crate::xml_deser::deser_structure_describe_fleets_instances(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_load_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoadPermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoadPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("userId") /* UserId com.amazonaws.ec2#LoadPermission$UserId */ => {
let var_2387 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_id(var_2387);
}
,
s if s.matches("group") /* Group com.amazonaws.ec2#LoadPermission$Group */ => {
let var_2388 =
Some(
Result::<crate::model::PermissionGroup, smithy_xml::decode::XmlError>::Ok(
crate::model::PermissionGroup::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_group(var_2388);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_pci_id(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PciId, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PciId::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DeviceId") /* DeviceId com.amazonaws.ec2#PciId$DeviceId */ => {
let var_2389 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_id(var_2389);
}
,
s if s.matches("VendorId") /* VendorId com.amazonaws.ec2#PciId$VendorId */ => {
let var_2390 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vendor_id(var_2390);
}
,
s if s.matches("SubsystemId") /* SubsystemId com.amazonaws.ec2#PciId$SubsystemId */ => {
let var_2391 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subsystem_id(var_2391);
}
,
s if s.matches("SubsystemVendorId") /* SubsystemVendorId com.amazonaws.ec2#PciId$SubsystemVendorId */ => {
let var_2392 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subsystem_vendor_id(var_2392);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fpga_image_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaImageState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaImageState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#FpgaImageState$Code */ => {
let var_2393 =
Some(
Result::<crate::model::FpgaImageStateCode, smithy_xml::decode::XmlError>::Ok(
crate::model::FpgaImageStateCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2393);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#FpgaImageState$Message */ => {
let var_2394 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2394);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_response_host_id_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ResponseHostIdSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_available_capacity(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AvailableCapacity, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AvailableCapacity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availableInstanceCapacity") /* AvailableInstanceCapacity com.amazonaws.ec2#AvailableCapacity$AvailableInstanceCapacity */ => {
let var_2395 =
Some(
crate::xml_deser::deser_list_available_instance_capacity_list(&mut tag)
?
)
;
builder = builder.set_available_instance_capacity(var_2395);
}
,
s if s.matches("availableVCpus") /* AvailableVCpus com.amazonaws.ec2#AvailableCapacity$AvailableVCpus */ => {
let var_2396 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_v_cpus(var_2396);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_host_properties(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostProperties, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostProperties::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cores") /* Cores com.amazonaws.ec2#HostProperties$Cores */ => {
let var_2397 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_cores(var_2397);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostProperties$InstanceType */ => {
let var_2398 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_2398);
}
,
s if s.matches("instanceFamily") /* InstanceFamily com.amazonaws.ec2#HostProperties$InstanceFamily */ => {
let var_2399 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_family(var_2399);
}
,
s if s.matches("sockets") /* Sockets com.amazonaws.ec2#HostProperties$Sockets */ => {
let var_2400 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_sockets(var_2400);
}
,
s if s.matches("totalVCpus") /* TotalVCpus com.amazonaws.ec2#HostProperties$TotalVCpus */ => {
let var_2401 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_v_cpus(var_2401);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_host_instance_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::HostInstance>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#HostInstanceList$member */ => {
out.push(
crate::xml_deser::deser_structure_host_instance(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_ebs_block_device(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsBlockDevice, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsBlockDevice$DeleteOnTermination */ => {
let var_2402 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2402);
}
,
s if s.matches("iops") /* Iops com.amazonaws.ec2#EbsBlockDevice$Iops */ => {
let var_2403 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_iops(var_2403);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#EbsBlockDevice$SnapshotId */ => {
let var_2404 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2404);
}
,
s if s.matches("volumeSize") /* VolumeSize com.amazonaws.ec2#EbsBlockDevice$VolumeSize */ => {
let var_2405 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_volume_size(var_2405);
}
,
s if s.matches("volumeType") /* VolumeType com.amazonaws.ec2#EbsBlockDevice$VolumeType */ => {
let var_2406 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_volume_type(var_2406);
}
,
s if s.matches("KmsKeyId") /* KmsKeyId com.amazonaws.ec2#EbsBlockDevice$KmsKeyId */ => {
let var_2407 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_2407);
}
,
s if s.matches("throughput") /* Throughput com.amazonaws.ec2#EbsBlockDevice$Throughput */ => {
let var_2408 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_throughput(var_2408);
}
,
s if s.matches("outpostArn") /* OutpostArn com.amazonaws.ec2#EbsBlockDevice$OutpostArn */ => {
let var_2409 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outpost_arn(var_2409);
}
,
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#EbsBlockDevice$Encrypted */ => {
let var_2410 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_2410);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_state_reason(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StateReason, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::StateReason::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#StateReason$Code */ => {
let var_2411 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2411);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#StateReason$Message */ => {
let var_2412 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2412);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ebs_instance_block_device(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInstanceBlockDevice, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInstanceBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#EbsInstanceBlockDevice$AttachTime */ => {
let var_2413 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_2413);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#EbsInstanceBlockDevice$DeleteOnTermination */ => {
let var_2414 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2414);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#EbsInstanceBlockDevice$Status */ => {
let var_2415 =
Some(
Result::<crate::model::AttachmentStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AttachmentStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2415);
}
,
s if s.matches("volumeId") /* VolumeId com.amazonaws.ec2#EbsInstanceBlockDevice$VolumeId */ => {
let var_2416 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_volume_id(var_2416);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_status_event_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceStatusEvent>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceStatusEventList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_status_event(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_state(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceState, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceState::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#InstanceState$Code */ => {
let var_2417 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_code(var_2417);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#InstanceState$Name */ => {
let var_2418 =
Some(
Result::<crate::model::InstanceStateName, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceStateName::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_name(var_2418);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_status_summary(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStatusSummary, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStatusSummary::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("details") /* Details com.amazonaws.ec2#InstanceStatusSummary$Details */ => {
let var_2419 =
Some(
crate::xml_deser::deser_list_instance_status_details_list(&mut tag)
?
)
;
builder = builder.set_details(var_2419);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#InstanceStatusSummary$Status */ => {
let var_2420 =
Some(
Result::<crate::model::SummaryStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::SummaryStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2420);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_usage_class_type_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::UsageClassType>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UsageClassTypeList$member */ => {
out.push(
Result::<crate::model::UsageClassType, smithy_xml::decode::XmlError>::Ok(
crate::model::UsageClassType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_root_device_type_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::RootDeviceType>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RootDeviceTypeList$member */ => {
out.push(
Result::<crate::model::RootDeviceType, smithy_xml::decode::XmlError>::Ok(
crate::model::RootDeviceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_virtualization_type_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VirtualizationType>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VirtualizationTypeList$member */ => {
out.push(
Result::<crate::model::VirtualizationType, smithy_xml::decode::XmlError>::Ok(
crate::model::VirtualizationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_processor_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProcessorInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ProcessorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedArchitectures") /* SupportedArchitectures com.amazonaws.ec2#ProcessorInfo$SupportedArchitectures */ => {
let var_2421 =
Some(
crate::xml_deser::deser_list_architecture_type_list(&mut tag)
?
)
;
builder = builder.set_supported_architectures(var_2421);
}
,
s if s.matches("sustainedClockSpeedInGhz") /* SustainedClockSpeedInGhz com.amazonaws.ec2#ProcessorInfo$SustainedClockSpeedInGhz */ => {
let var_2422 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
}
?
)
;
builder = builder.set_sustained_clock_speed_in_ghz(var_2422);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_v_cpu_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VCpuInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VCpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("defaultVCpus") /* DefaultVCpus com.amazonaws.ec2#VCpuInfo$DefaultVCpus */ => {
let var_2423 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#VCpuCount`)"))
}
?
)
;
builder = builder.set_default_v_cpus(var_2423);
}
,
s if s.matches("defaultCores") /* DefaultCores com.amazonaws.ec2#VCpuInfo$DefaultCores */ => {
let var_2424 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#CoreCount`)"))
}
?
)
;
builder = builder.set_default_cores(var_2424);
}
,
s if s.matches("defaultThreadsPerCore") /* DefaultThreadsPerCore com.amazonaws.ec2#VCpuInfo$DefaultThreadsPerCore */ => {
let var_2425 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#ThreadsPerCore`)"))
}
?
)
;
builder = builder.set_default_threads_per_core(var_2425);
}
,
s if s.matches("validCores") /* ValidCores com.amazonaws.ec2#VCpuInfo$ValidCores */ => {
let var_2426 =
Some(
crate::xml_deser::deser_list_core_count_list(&mut tag)
?
)
;
builder = builder.set_valid_cores(var_2426);
}
,
s if s.matches("validThreadsPerCore") /* ValidThreadsPerCore com.amazonaws.ec2#VCpuInfo$ValidThreadsPerCore */ => {
let var_2427 =
Some(
crate::xml_deser::deser_list_threads_per_core_list(&mut tag)
?
)
;
builder = builder.set_valid_threads_per_core(var_2427);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_memory_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::MemoryInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::MemoryInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInMiB") /* SizeInMiB com.amazonaws.ec2#MemoryInfo$SizeInMiB */ => {
let var_2428 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#MemorySize`)"))
}
?
)
;
builder = builder.set_size_in_mi_b(var_2428);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_storage_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStorageInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStorageInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("totalSizeInGB") /* TotalSizeInGB com.amazonaws.ec2#InstanceStorageInfo$TotalSizeInGB */ => {
let var_2429 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_total_size_in_gb(var_2429);
}
,
s if s.matches("disks") /* Disks com.amazonaws.ec2#InstanceStorageInfo$Disks */ => {
let var_2430 =
Some(
crate::xml_deser::deser_list_disk_info_list(&mut tag)
?
)
;
builder = builder.set_disks(var_2430);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#InstanceStorageInfo$NvmeSupport */ => {
let var_2431 =
Some(
Result::<crate::model::EphemeralNvmeSupport, smithy_xml::decode::XmlError>::Ok(
crate::model::EphemeralNvmeSupport::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2431);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ebs_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ebsOptimizedSupport") /* EbsOptimizedSupport com.amazonaws.ec2#EbsInfo$EbsOptimizedSupport */ => {
let var_2432 =
Some(
Result::<crate::model::EbsOptimizedSupport, smithy_xml::decode::XmlError>::Ok(
crate::model::EbsOptimizedSupport::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_ebs_optimized_support(var_2432);
}
,
s if s.matches("encryptionSupport") /* EncryptionSupport com.amazonaws.ec2#EbsInfo$EncryptionSupport */ => {
let var_2433 =
Some(
Result::<crate::model::EbsEncryptionSupport, smithy_xml::decode::XmlError>::Ok(
crate::model::EbsEncryptionSupport::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_encryption_support(var_2433);
}
,
s if s.matches("ebsOptimizedInfo") /* EbsOptimizedInfo com.amazonaws.ec2#EbsInfo$EbsOptimizedInfo */ => {
let var_2434 =
Some(
crate::xml_deser::deser_structure_ebs_optimized_info(&mut tag)
?
)
;
builder = builder.set_ebs_optimized_info(var_2434);
}
,
s if s.matches("nvmeSupport") /* NvmeSupport com.amazonaws.ec2#EbsInfo$NvmeSupport */ => {
let var_2435 =
Some(
Result::<crate::model::EbsNvmeSupport, smithy_xml::decode::XmlError>::Ok(
crate::model::EbsNvmeSupport::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_nvme_support(var_2435);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkPerformance") /* NetworkPerformance com.amazonaws.ec2#NetworkInfo$NetworkPerformance */ => {
let var_2436 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_performance(var_2436);
}
,
s if s.matches("maximumNetworkInterfaces") /* MaximumNetworkInterfaces com.amazonaws.ec2#NetworkInfo$MaximumNetworkInterfaces */ => {
let var_2437 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaxNetworkInterfaces`)"))
}
?
)
;
builder = builder.set_maximum_network_interfaces(var_2437);
}
,
s if s.matches("maximumNetworkCards") /* MaximumNetworkCards com.amazonaws.ec2#NetworkInfo$MaximumNetworkCards */ => {
let var_2438 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaximumNetworkCards`)"))
}
?
)
;
builder = builder.set_maximum_network_cards(var_2438);
}
,
s if s.matches("defaultNetworkCardIndex") /* DefaultNetworkCardIndex com.amazonaws.ec2#NetworkInfo$DefaultNetworkCardIndex */ => {
let var_2439 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#DefaultNetworkCardIndex`)"))
}
?
)
;
builder = builder.set_default_network_card_index(var_2439);
}
,
s if s.matches("networkCards") /* NetworkCards com.amazonaws.ec2#NetworkInfo$NetworkCards */ => {
let var_2440 =
Some(
crate::xml_deser::deser_list_network_card_info_list(&mut tag)
?
)
;
builder = builder.set_network_cards(var_2440);
}
,
s if s.matches("ipv4AddressesPerInterface") /* Ipv4AddressesPerInterface com.amazonaws.ec2#NetworkInfo$Ipv4AddressesPerInterface */ => {
let var_2441 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaxIpv4AddrPerInterface`)"))
}
?
)
;
builder = builder.set_ipv4_addresses_per_interface(var_2441);
}
,
s if s.matches("ipv6AddressesPerInterface") /* Ipv6AddressesPerInterface com.amazonaws.ec2#NetworkInfo$Ipv6AddressesPerInterface */ => {
let var_2442 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaxIpv6AddrPerInterface`)"))
}
?
)
;
builder = builder.set_ipv6_addresses_per_interface(var_2442);
}
,
s if s.matches("ipv6Supported") /* Ipv6Supported com.amazonaws.ec2#NetworkInfo$Ipv6Supported */ => {
let var_2443 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Ipv6Flag`)"))
}
?
)
;
builder = builder.set_ipv6_supported(var_2443);
}
,
s if s.matches("enaSupport") /* EnaSupport com.amazonaws.ec2#NetworkInfo$EnaSupport */ => {
let var_2444 =
Some(
Result::<crate::model::EnaSupport, smithy_xml::decode::XmlError>::Ok(
crate::model::EnaSupport::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_ena_support(var_2444);
}
,
s if s.matches("efaSupported") /* EfaSupported com.amazonaws.ec2#NetworkInfo$EfaSupported */ => {
let var_2445 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#EfaSupportedFlag`)"))
}
?
)
;
builder = builder.set_efa_supported(var_2445);
}
,
s if s.matches("efaInfo") /* EfaInfo com.amazonaws.ec2#NetworkInfo$EfaInfo */ => {
let var_2446 =
Some(
crate::xml_deser::deser_structure_efa_info(&mut tag)
?
)
;
builder = builder.set_efa_info(var_2446);
}
,
s if s.matches("encryptionInTransitSupported") /* EncryptionInTransitSupported com.amazonaws.ec2#NetworkInfo$EncryptionInTransitSupported */ => {
let var_2447 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#EncryptionInTransitSupported`)"))
}
?
)
;
builder = builder.set_encryption_in_transit_supported(var_2447);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_gpu_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("gpus") /* Gpus com.amazonaws.ec2#GpuInfo$Gpus */ => {
let var_2448 =
Some(
crate::xml_deser::deser_list_gpu_device_info_list(&mut tag)
?
)
;
builder = builder.set_gpus(var_2448);
}
,
s if s.matches("totalGpuMemoryInMiB") /* TotalGpuMemoryInMiB com.amazonaws.ec2#GpuInfo$TotalGpuMemoryInMiB */ => {
let var_2449 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#totalGpuMemory`)"))
}
?
)
;
builder = builder.set_total_gpu_memory_in_mi_b(var_2449);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fpga_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fpgas") /* Fpgas com.amazonaws.ec2#FpgaInfo$Fpgas */ => {
let var_2450 =
Some(
crate::xml_deser::deser_list_fpga_device_info_list(&mut tag)
?
)
;
builder = builder.set_fpgas(var_2450);
}
,
s if s.matches("totalFpgaMemoryInMiB") /* TotalFpgaMemoryInMiB com.amazonaws.ec2#FpgaInfo$TotalFpgaMemoryInMiB */ => {
let var_2451 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#totalFpgaMemory`)"))
}
?
)
;
builder = builder.set_total_fpga_memory_in_mi_b(var_2451);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_placement_group_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PlacementGroupInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PlacementGroupInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedStrategies") /* SupportedStrategies com.amazonaws.ec2#PlacementGroupInfo$SupportedStrategies */ => {
let var_2452 =
Some(
crate::xml_deser::deser_list_placement_group_strategy_list(&mut tag)
?
)
;
builder = builder.set_supported_strategies(var_2452);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_inference_accelerator_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InferenceAcceleratorInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InferenceAcceleratorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("accelerators") /* Accelerators com.amazonaws.ec2#InferenceAcceleratorInfo$Accelerators */ => {
let var_2453 =
Some(
crate::xml_deser::deser_list_inference_device_info_list(&mut tag)
?
)
;
builder = builder.set_accelerators(var_2453);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_boot_mode_type_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::BootModeType>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#BootModeTypeList$member */ => {
out.push(
Result::<crate::model::BootModeType, smithy_xml::decode::XmlError>::Ok(
crate::model::BootModeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_pool_cidr_blocks_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PoolCidrBlock>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PoolCidrBlocksSet$member */ => {
out.push(
crate::xml_deser::deser_structure_pool_cidr_block(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_local_gateway_virtual_interface_id_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LocalGatewayVirtualInterfaceIdSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_public_ipv4_pool_range_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PublicIpv4PoolRange>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PublicIpv4PoolRangeSet$member */ => {
out.push(
crate::xml_deser::deser_structure_public_ipv4_pool_range(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_recurring_charges_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::RecurringCharge>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#RecurringChargesList$member */ => {
out.push(
crate::xml_deser::deser_structure_recurring_charge(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reserved_instances_modification_result_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::ReservedInstancesModificationResult>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedInstancesModificationResultList$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances_modification_result(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_reserved_intances_ids(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ReservedInstancesId>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ReservedIntancesIds$member */ => {
out.push(
crate::xml_deser::deser_structure_reserved_instances_id(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_pricing_details_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PricingDetail>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PricingDetailsList$member */ => {
out.push(
crate::xml_deser::deser_structure_pricing_detail(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_scheduled_instance_recurrence(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ScheduledInstanceRecurrence, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ScheduledInstanceRecurrence::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#ScheduledInstanceRecurrence$Frequency */ => {
let var_2454 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_frequency(var_2454);
}
,
s if s.matches("interval") /* Interval com.amazonaws.ec2#ScheduledInstanceRecurrence$Interval */ => {
let var_2455 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_interval(var_2455);
}
,
s if s.matches("occurrenceDaySet") /* OccurrenceDaySet com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceDaySet */ => {
let var_2456 =
Some(
crate::xml_deser::deser_list_occurrence_day_set(&mut tag)
?
)
;
builder = builder.set_occurrence_day_set(var_2456);
}
,
s if s.matches("occurrenceRelativeToEnd") /* OccurrenceRelativeToEnd com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceRelativeToEnd */ => {
let var_2457 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_occurrence_relative_to_end(var_2457);
}
,
s if s.matches("occurrenceUnit") /* OccurrenceUnit com.amazonaws.ec2#ScheduledInstanceRecurrence$OccurrenceUnit */ => {
let var_2458 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_occurrence_unit(var_2458);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_fleet_request_config_data(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetRequestConfigData, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetRequestConfigData::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("allocationStrategy") /* AllocationStrategy com.amazonaws.ec2#SpotFleetRequestConfigData$AllocationStrategy */ => {
let var_2459 =
Some(
Result::<crate::model::AllocationStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::AllocationStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_allocation_strategy(var_2459);
}
,
s if s.matches("onDemandAllocationStrategy") /* OnDemandAllocationStrategy com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandAllocationStrategy */ => {
let var_2460 =
Some(
Result::<crate::model::OnDemandAllocationStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::OnDemandAllocationStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_on_demand_allocation_strategy(var_2460);
}
,
s if s.matches("spotMaintenanceStrategies") /* SpotMaintenanceStrategies com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaintenanceStrategies */ => {
let var_2461 =
Some(
crate::xml_deser::deser_structure_spot_maintenance_strategies(&mut tag)
?
)
;
builder = builder.set_spot_maintenance_strategies(var_2461);
}
,
s if s.matches("clientToken") /* ClientToken com.amazonaws.ec2#SpotFleetRequestConfigData$ClientToken */ => {
let var_2462 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_token(var_2462);
}
,
s if s.matches("excessCapacityTerminationPolicy") /* ExcessCapacityTerminationPolicy com.amazonaws.ec2#SpotFleetRequestConfigData$ExcessCapacityTerminationPolicy */ => {
let var_2463 =
Some(
Result::<crate::model::ExcessCapacityTerminationPolicy, smithy_xml::decode::XmlError>::Ok(
crate::model::ExcessCapacityTerminationPolicy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_excess_capacity_termination_policy(var_2463);
}
,
s if s.matches("fulfilledCapacity") /* FulfilledCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$FulfilledCapacity */ => {
let var_2464 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_fulfilled_capacity(var_2464);
}
,
s if s.matches("onDemandFulfilledCapacity") /* OnDemandFulfilledCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandFulfilledCapacity */ => {
let var_2465 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_on_demand_fulfilled_capacity(var_2465);
}
,
s if s.matches("iamFleetRole") /* IamFleetRole com.amazonaws.ec2#SpotFleetRequestConfigData$IamFleetRole */ => {
let var_2466 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_iam_fleet_role(var_2466);
}
,
s if s.matches("launchSpecifications") /* LaunchSpecifications com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchSpecifications */ => {
let var_2467 =
Some(
crate::xml_deser::deser_list_launch_specs_list(&mut tag)
?
)
;
builder = builder.set_launch_specifications(var_2467);
}
,
s if s.matches("launchTemplateConfigs") /* LaunchTemplateConfigs com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchTemplateConfigs */ => {
let var_2468 =
Some(
crate::xml_deser::deser_list_launch_template_config_list(&mut tag)
?
)
;
builder = builder.set_launch_template_configs(var_2468);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotFleetRequestConfigData$SpotPrice */ => {
let var_2469 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_2469);
}
,
s if s.matches("targetCapacity") /* TargetCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$TargetCapacity */ => {
let var_2470 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_target_capacity(var_2470);
}
,
s if s.matches("onDemandTargetCapacity") /* OnDemandTargetCapacity com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandTargetCapacity */ => {
let var_2471 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_on_demand_target_capacity(var_2471);
}
,
s if s.matches("onDemandMaxTotalPrice") /* OnDemandMaxTotalPrice com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandMaxTotalPrice */ => {
let var_2472 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_on_demand_max_total_price(var_2472);
}
,
s if s.matches("spotMaxTotalPrice") /* SpotMaxTotalPrice com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaxTotalPrice */ => {
let var_2473 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_max_total_price(var_2473);
}
,
s if s.matches("terminateInstancesWithExpiration") /* TerminateInstancesWithExpiration com.amazonaws.ec2#SpotFleetRequestConfigData$TerminateInstancesWithExpiration */ => {
let var_2474 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_terminate_instances_with_expiration(var_2474);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#SpotFleetRequestConfigData$Type */ => {
let var_2475 =
Some(
Result::<crate::model::FleetType, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_2475);
}
,
s if s.matches("validFrom") /* ValidFrom com.amazonaws.ec2#SpotFleetRequestConfigData$ValidFrom */ => {
let var_2476 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_from(var_2476);
}
,
s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#SpotFleetRequestConfigData$ValidUntil */ => {
let var_2477 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_until(var_2477);
}
,
s if s.matches("replaceUnhealthyInstances") /* ReplaceUnhealthyInstances com.amazonaws.ec2#SpotFleetRequestConfigData$ReplaceUnhealthyInstances */ => {
let var_2478 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_replace_unhealthy_instances(var_2478);
}
,
s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#SpotFleetRequestConfigData$InstanceInterruptionBehavior */ => {
let var_2479 =
Some(
Result::<crate::model::InstanceInterruptionBehavior, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceInterruptionBehavior::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_interruption_behavior(var_2479);
}
,
s if s.matches("loadBalancersConfig") /* LoadBalancersConfig com.amazonaws.ec2#SpotFleetRequestConfigData$LoadBalancersConfig */ => {
let var_2480 =
Some(
crate::xml_deser::deser_structure_load_balancers_config(&mut tag)
?
)
;
builder = builder.set_load_balancers_config(var_2480);
}
,
s if s.matches("instancePoolsToUseCount") /* InstancePoolsToUseCount com.amazonaws.ec2#SpotFleetRequestConfigData$InstancePoolsToUseCount */ => {
let var_2481 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_pools_to_use_count(var_2481);
}
,
s if s.matches("context") /* Context com.amazonaws.ec2#SpotFleetRequestConfigData$Context */ => {
let var_2482 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_context(var_2482);
}
,
s if s.matches("TagSpecification") /* TagSpecifications com.amazonaws.ec2#SpotFleetRequestConfigData$TagSpecifications */ => {
let var_2483 =
Some(
crate::xml_deser::deser_list_tag_specification_list(&mut tag)
?
)
;
builder = builder.set_tag_specifications(var_2483);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("userData") /* UserData com.amazonaws.ec2#LaunchSpecification$UserData */ => {
let var_2484 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_data(var_2484);
}
,
s if s.matches("groupSet") /* SecurityGroups com.amazonaws.ec2#LaunchSpecification$SecurityGroups */ => {
let var_2485 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_2485);
}
,
s if s.matches("addressingType") /* AddressingType com.amazonaws.ec2#LaunchSpecification$AddressingType */ => {
let var_2486 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_addressing_type(var_2486);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#LaunchSpecification$BlockDeviceMappings */ => {
let var_2487 =
Some(
crate::xml_deser::deser_list_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_2487);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#LaunchSpecification$EbsOptimized */ => {
let var_2488 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_2488);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#LaunchSpecification$IamInstanceProfile */ => {
let var_2489 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile_specification(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_2489);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#LaunchSpecification$ImageId */ => {
let var_2490 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_2490);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#LaunchSpecification$InstanceType */ => {
let var_2491 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2491);
}
,
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#LaunchSpecification$KernelId */ => {
let var_2492 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kernel_id(var_2492);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#LaunchSpecification$KeyName */ => {
let var_2493 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_2493);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#LaunchSpecification$NetworkInterfaces */ => {
let var_2494 =
Some(
crate::xml_deser::deser_list_instance_network_interface_specification_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_2494);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#LaunchSpecification$Placement */ => {
let var_2495 =
Some(
crate::xml_deser::deser_structure_spot_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_2495);
}
,
s if s.matches("ramdiskId") /* RamdiskId com.amazonaws.ec2#LaunchSpecification$RamdiskId */ => {
let var_2496 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ramdisk_id(var_2496);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#LaunchSpecification$SubnetId */ => {
let var_2497 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2497);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#LaunchSpecification$Monitoring */ => {
let var_2498 =
Some(
crate::xml_deser::deser_structure_run_instances_monitoring_enabled(&mut tag)
?
)
;
builder = builder.set_monitoring(var_2498);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_instance_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotInstanceStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotInstanceStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#SpotInstanceStatus$Code */ => {
let var_2499 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2499);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#SpotInstanceStatus$Message */ => {
let var_2500 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2500);
}
,
s if s.matches("updateTime") /* UpdateTime com.amazonaws.ec2#SpotInstanceStatus$UpdateTime */ => {
let var_2501 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_update_time(var_2501);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_stale_ip_permission_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::StaleIpPermission>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#StaleIpPermissionSet$member */ => {
out.push(
crate::xml_deser::deser_structure_stale_ip_permission(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_transit_gateway_attachment_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAttachmentAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayAttachmentAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayRouteTableId") /* TransitGatewayRouteTableId com.amazonaws.ec2#TransitGatewayAttachmentAssociation$TransitGatewayRouteTableId */ => {
let var_2502 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_route_table_id(var_2502);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#TransitGatewayAttachmentAssociation$State */ => {
let var_2503 =
Some(
Result::<crate::model::TransitGatewayAssociationState, smithy_xml::decode::XmlError>::Ok(
crate::model::TransitGatewayAssociationState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2503);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_volume_status_actions_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeStatusAction>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeStatusActionsList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_status_action(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_volume_status_events_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeStatusEvent>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeStatusEventsList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_status_event(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_volume_status_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("details") /* Details com.amazonaws.ec2#VolumeStatusInfo$Details */ => {
let var_2504 =
Some(
crate::xml_deser::deser_list_volume_status_details_list(&mut tag)
?
)
;
builder = builder.set_details(var_2504);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#VolumeStatusInfo$Status */ => {
let var_2505 =
Some(
Result::<crate::model::VolumeStatusInfoStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeStatusInfoStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2505);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_volume_status_attachment_status_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeStatusAttachmentStatus>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeStatusAttachmentStatusList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_status_attachment_status(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_private_dns_details_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrivateDnsDetails>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrivateDnsDetailsSet$member */ => {
out.push(
crate::xml_deser::deser_structure_private_dns_details(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_disable_fast_snapshot_restore_state_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::DisableFastSnapshotRestoreStateErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DisableFastSnapshotRestoreStateErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_disable_fast_snapshot_restore_state_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_enable_fast_snapshot_restore_state_error_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::EnableFastSnapshotRestoreStateErrorItem>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#EnableFastSnapshotRestoreStateErrorSet$member */ => {
out.push(
crate::xml_deser::deser_structure_enable_fast_snapshot_restore_state_error_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_launch_template_block_device_mapping(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateBlockDeviceMapping, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateBlockDeviceMapping::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("deviceName") /* DeviceName com.amazonaws.ec2#LaunchTemplateBlockDeviceMapping$DeviceName */ => {
let var_2506 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_device_name(var_2506);
}
,
s if s.matches("virtualName") /* VirtualName com.amazonaws.ec2#LaunchTemplateBlockDeviceMapping$VirtualName */ => {
let var_2507 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_virtual_name(var_2507);
}
,
s if s.matches("ebs") /* Ebs com.amazonaws.ec2#LaunchTemplateBlockDeviceMapping$Ebs */ => {
let var_2508 =
Some(
crate::xml_deser::deser_structure_launch_template_ebs_block_device(&mut tag)
?
)
;
builder = builder.set_ebs(var_2508);
}
,
s if s.matches("noDevice") /* NoDevice com.amazonaws.ec2#LaunchTemplateBlockDeviceMapping$NoDevice */ => {
let var_2509 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_no_device(var_2509);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_instance_network_interface_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateInstanceNetworkInterfaceSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associateCarrierIpAddress") /* AssociateCarrierIpAddress com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$AssociateCarrierIpAddress */ => {
let var_2510 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_associate_carrier_ip_address(var_2510);
}
,
s if s.matches("associatePublicIpAddress") /* AssociatePublicIpAddress com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$AssociatePublicIpAddress */ => {
let var_2511 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_associate_public_ip_address(var_2511);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$DeleteOnTermination */ => {
let var_2512 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2512);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Description */ => {
let var_2513 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2513);
}
,
s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$DeviceIndex */ => {
let var_2514 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_device_index(var_2514);
}
,
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Groups */ => {
let var_2515 =
Some(
crate::xml_deser::deser_list_group_id_string_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2515);
}
,
s if s.matches("interfaceType") /* InterfaceType com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$InterfaceType */ => {
let var_2516 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_interface_type(var_2516);
}
,
s if s.matches("ipv6AddressCount") /* Ipv6AddressCount com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv6AddressCount */ => {
let var_2517 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv6_address_count(var_2517);
}
,
s if s.matches("ipv6AddressesSet") /* Ipv6Addresses com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv6Addresses */ => {
let var_2518 =
Some(
crate::xml_deser::deser_list_instance_ipv6_address_list(&mut tag)
?
)
;
builder = builder.set_ipv6_addresses(var_2518);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$NetworkInterfaceId */ => {
let var_2519 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2519);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$PrivateIpAddress */ => {
let var_2520 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2520);
}
,
s if s.matches("privateIpAddressesSet") /* PrivateIpAddresses com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$PrivateIpAddresses */ => {
let var_2521 =
Some(
crate::xml_deser::deser_list_private_ip_address_specification_list(&mut tag)
?
)
;
builder = builder.set_private_ip_addresses(var_2521);
}
,
s if s.matches("secondaryPrivateIpAddressCount") /* SecondaryPrivateIpAddressCount com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$SecondaryPrivateIpAddressCount */ => {
let var_2522 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_secondary_private_ip_address_count(var_2522);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$SubnetId */ => {
let var_2523 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2523);
}
,
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$NetworkCardIndex */ => {
let var_2524 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_network_card_index(var_2524);
}
,
s if s.matches("ipv4PrefixSet") /* Ipv4Prefixes com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv4Prefixes */ => {
let var_2525 =
Some(
crate::xml_deser::deser_list_ipv4_prefix_list_response(&mut tag)
?
)
;
builder = builder.set_ipv4_prefixes(var_2525);
}
,
s if s.matches("ipv4PrefixCount") /* Ipv4PrefixCount com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv4PrefixCount */ => {
let var_2526 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv4_prefix_count(var_2526);
}
,
s if s.matches("ipv6PrefixSet") /* Ipv6Prefixes com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv6Prefixes */ => {
let var_2527 =
Some(
crate::xml_deser::deser_list_ipv6_prefix_list_response(&mut tag)
?
)
;
builder = builder.set_ipv6_prefixes(var_2527);
}
,
s if s.matches("ipv6PrefixCount") /* Ipv6PrefixCount com.amazonaws.ec2#LaunchTemplateInstanceNetworkInterfaceSpecification$Ipv6PrefixCount */ => {
let var_2528 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv6_prefix_count(var_2528);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_tag_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateTagSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateTagSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#LaunchTemplateTagSpecification$ResourceType */ => {
let var_2529 =
Some(
Result::<crate::model::ResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::ResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2529);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#LaunchTemplateTagSpecification$Tags */ => {
let var_2530 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2530);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_elastic_gpu_specification_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ElasticGpuSpecificationResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ElasticGpuSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("type") /* Type com.amazonaws.ec2#ElasticGpuSpecificationResponse$Type */ => {
let var_2531 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_type(var_2531);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_elastic_inference_accelerator_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::LaunchTemplateElasticInferenceAcceleratorResponse,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateElasticInferenceAcceleratorResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("type") /* Type com.amazonaws.ec2#LaunchTemplateElasticInferenceAcceleratorResponse$Type */ => {
let var_2532 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_type(var_2532);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#LaunchTemplateElasticInferenceAcceleratorResponse$Count */ => {
let var_2533 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_count(var_2533);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_spot_market_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateSpotMarketOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateSpotMarketOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("maxPrice") /* MaxPrice com.amazonaws.ec2#LaunchTemplateSpotMarketOptions$MaxPrice */ => {
let var_2534 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_max_price(var_2534);
}
,
s if s.matches("spotInstanceType") /* SpotInstanceType com.amazonaws.ec2#LaunchTemplateSpotMarketOptions$SpotInstanceType */ => {
let var_2535 =
Some(
Result::<crate::model::SpotInstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::SpotInstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_spot_instance_type(var_2535);
}
,
s if s.matches("blockDurationMinutes") /* BlockDurationMinutes com.amazonaws.ec2#LaunchTemplateSpotMarketOptions$BlockDurationMinutes */ => {
let var_2536 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_block_duration_minutes(var_2536);
}
,
s if s.matches("validUntil") /* ValidUntil com.amazonaws.ec2#LaunchTemplateSpotMarketOptions$ValidUntil */ => {
let var_2537 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_valid_until(var_2537);
}
,
s if s.matches("instanceInterruptionBehavior") /* InstanceInterruptionBehavior com.amazonaws.ec2#LaunchTemplateSpotMarketOptions$InstanceInterruptionBehavior */ => {
let var_2538 =
Some(
Result::<crate::model::InstanceInterruptionBehavior, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceInterruptionBehavior::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_interruption_behavior(var_2538);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_capacity_reservation_target_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservationTargetResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservationTargetResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationId") /* CapacityReservationId com.amazonaws.ec2#CapacityReservationTargetResponse$CapacityReservationId */ => {
let var_2539 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_id(var_2539);
}
,
s if s.matches("capacityReservationResourceGroupArn") /* CapacityReservationResourceGroupArn com.amazonaws.ec2#CapacityReservationTargetResponse$CapacityReservationResourceGroupArn */ => {
let var_2540 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_capacity_reservation_resource_group_arn(var_2540);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_license_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateLicenseConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateLicenseConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("licenseConfigurationArn") /* LicenseConfigurationArn com.amazonaws.ec2#LaunchTemplateLicenseConfiguration$LicenseConfigurationArn */ => {
let var_2541 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_license_configuration_arn(var_2541);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_target_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#TargetConfiguration$InstanceCount */ => {
let var_2542 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_count(var_2542);
}
,
s if s.matches("offeringId") /* OfferingId com.amazonaws.ec2#TargetConfiguration$OfferingId */ => {
let var_2543 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_offering_id(var_2543);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_import_instance_volume_detail_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ImportInstanceVolumeDetailItem>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ImportInstanceVolumeDetailSet$member */ => {
out.push(
crate::xml_deser::deser_structure_import_instance_volume_detail_item(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_disk_image_description(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskImageDescription, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskImageDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("checksum") /* Checksum com.amazonaws.ec2#DiskImageDescription$Checksum */ => {
let var_2544 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_checksum(var_2544);
}
,
s if s.matches("format") /* Format com.amazonaws.ec2#DiskImageDescription$Format */ => {
let var_2545 =
Some(
Result::<crate::model::DiskImageFormat, smithy_xml::decode::XmlError>::Ok(
crate::model::DiskImageFormat::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_format(var_2545);
}
,
s if s.matches("importManifestUrl") /* ImportManifestUrl com.amazonaws.ec2#DiskImageDescription$ImportManifestUrl */ => {
let var_2546 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_import_manifest_url(var_2546);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#DiskImageDescription$Size */ => {
let var_2547 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_size(var_2547);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disk_image_volume_description(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskImageVolumeDescription, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskImageVolumeDescription::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("id") /* Id com.amazonaws.ec2#DiskImageVolumeDescription$Id */ => {
let var_2548 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_2548);
}
,
s if s.matches("size") /* Size com.amazonaws.ec2#DiskImageVolumeDescription$Size */ => {
let var_2549 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_size(var_2549);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_unsuccessful_instance_credit_specification_item_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
crate::model::UnsuccessfulInstanceCreditSpecificationItemError,
smithy_xml::decode::XmlError,
> {
#[allow(unused_mut)]
let mut builder = crate::model::UnsuccessfulInstanceCreditSpecificationItemError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#UnsuccessfulInstanceCreditSpecificationItemError$Code */ => {
let var_2550 =
Some(
Result::<crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode, smithy_xml::decode::XmlError>::Ok(
crate::model::UnsuccessfulInstanceCreditSpecificationErrorCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2550);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#UnsuccessfulInstanceCreditSpecificationItemError$Message */ => {
let var_2551 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2551);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_monitoring(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Monitoring, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Monitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("state") /* State com.amazonaws.ec2#Monitoring$State */ => {
let var_2552 =
Some(
Result::<crate::model::MonitoringState, smithy_xml::decode::XmlError>::Ok(
crate::model::MonitoringState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2552);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_ip_range_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::IpRange>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IpRangeList$member */ => {
out.push(
crate::xml_deser::deser_structure_ip_range(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_range_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6Range>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6RangeList$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_range(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_prefix_list_id_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrefixListId>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrefixListIdList$member */ => {
out.push(
crate::xml_deser::deser_structure_prefix_list_id(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_user_id_group_pair_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::UserIdGroupPair>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UserIdGroupPairList$member */ => {
out.push(
crate::xml_deser::deser_structure_user_id_group_pair(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_placement(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Placement, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Placement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#Placement$AvailabilityZone */ => {
let var_2553 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2553);
}
,
s if s.matches("affinity") /* Affinity com.amazonaws.ec2#Placement$Affinity */ => {
let var_2554 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_affinity(var_2554);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#Placement$GroupName */ => {
let var_2555 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2555);
}
,
s if s.matches("partitionNumber") /* PartitionNumber com.amazonaws.ec2#Placement$PartitionNumber */ => {
let var_2556 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_partition_number(var_2556);
}
,
s if s.matches("hostId") /* HostId com.amazonaws.ec2#Placement$HostId */ => {
let var_2557 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_id(var_2557);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#Placement$Tenancy */ => {
let var_2558 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_2558);
}
,
s if s.matches("spreadDomain") /* SpreadDomain com.amazonaws.ec2#Placement$SpreadDomain */ => {
let var_2559 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spread_domain(var_2559);
}
,
s if s.matches("hostResourceGroupArn") /* HostResourceGroupArn com.amazonaws.ec2#Placement$HostResourceGroupArn */ => {
let var_2560 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_host_resource_group_arn(var_2560);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_elastic_gpu_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ElasticGpuAssociation>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ElasticGpuAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_elastic_gpu_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_elastic_inference_accelerator_association_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::ElasticInferenceAcceleratorAssociation>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ElasticInferenceAcceleratorAssociationList$member */ => {
out.push(
crate::xml_deser::deser_structure_elastic_inference_accelerator_association(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_network_interface_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceNetworkInterface>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceNetworkInterfaceList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_network_interface(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_cpu_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CpuOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CpuOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("coreCount") /* CoreCount com.amazonaws.ec2#CpuOptions$CoreCount */ => {
let var_2561 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_core_count(var_2561);
}
,
s if s.matches("threadsPerCore") /* ThreadsPerCore com.amazonaws.ec2#CpuOptions$ThreadsPerCore */ => {
let var_2562 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_threads_per_core(var_2562);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_capacity_reservation_specification_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservationSpecificationResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservationSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityReservationPreference") /* CapacityReservationPreference com.amazonaws.ec2#CapacityReservationSpecificationResponse$CapacityReservationPreference */ => {
let var_2563 =
Some(
Result::<crate::model::CapacityReservationPreference, smithy_xml::decode::XmlError>::Ok(
crate::model::CapacityReservationPreference::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_capacity_reservation_preference(var_2563);
}
,
s if s.matches("capacityReservationTarget") /* CapacityReservationTarget com.amazonaws.ec2#CapacityReservationSpecificationResponse$CapacityReservationTarget */ => {
let var_2564 =
Some(
crate::xml_deser::deser_structure_capacity_reservation_target_response(&mut tag)
?
)
;
builder = builder.set_capacity_reservation_target(var_2564);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_hibernation_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HibernationOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HibernationOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("configured") /* Configured com.amazonaws.ec2#HibernationOptions$Configured */ => {
let var_2565 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_configured(var_2565);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_license_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LicenseConfiguration>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LicenseList$member */ => {
out.push(
crate::xml_deser::deser_structure_license_configuration(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_path_component(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PathComponent, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PathComponent::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sequenceNumber") /* SequenceNumber com.amazonaws.ec2#PathComponent$SequenceNumber */ => {
let var_2566 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_sequence_number(var_2566);
}
,
s if s.matches("aclRule") /* AclRule com.amazonaws.ec2#PathComponent$AclRule */ => {
let var_2567 =
Some(
crate::xml_deser::deser_structure_analysis_acl_rule(&mut tag)
?
)
;
builder = builder.set_acl_rule(var_2567);
}
,
s if s.matches("component") /* Component com.amazonaws.ec2#PathComponent$Component */ => {
let var_2568 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_component(var_2568);
}
,
s if s.matches("destinationVpc") /* DestinationVpc com.amazonaws.ec2#PathComponent$DestinationVpc */ => {
let var_2569 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_destination_vpc(var_2569);
}
,
s if s.matches("outboundHeader") /* OutboundHeader com.amazonaws.ec2#PathComponent$OutboundHeader */ => {
let var_2570 =
Some(
crate::xml_deser::deser_structure_analysis_packet_header(&mut tag)
?
)
;
builder = builder.set_outbound_header(var_2570);
}
,
s if s.matches("inboundHeader") /* InboundHeader com.amazonaws.ec2#PathComponent$InboundHeader */ => {
let var_2571 =
Some(
crate::xml_deser::deser_structure_analysis_packet_header(&mut tag)
?
)
;
builder = builder.set_inbound_header(var_2571);
}
,
s if s.matches("routeTableRoute") /* RouteTableRoute com.amazonaws.ec2#PathComponent$RouteTableRoute */ => {
let var_2572 =
Some(
crate::xml_deser::deser_structure_analysis_route_table_route(&mut tag)
?
)
;
builder = builder.set_route_table_route(var_2572);
}
,
s if s.matches("securityGroupRule") /* SecurityGroupRule com.amazonaws.ec2#PathComponent$SecurityGroupRule */ => {
let var_2573 =
Some(
crate::xml_deser::deser_structure_analysis_security_group_rule(&mut tag)
?
)
;
builder = builder.set_security_group_rule(var_2573);
}
,
s if s.matches("sourceVpc") /* SourceVpc com.amazonaws.ec2#PathComponent$SourceVpc */ => {
let var_2574 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_source_vpc(var_2574);
}
,
s if s.matches("subnet") /* Subnet com.amazonaws.ec2#PathComponent$Subnet */ => {
let var_2575 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_subnet(var_2575);
}
,
s if s.matches("vpc") /* Vpc com.amazonaws.ec2#PathComponent$Vpc */ => {
let var_2576 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpc(var_2576);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_explanation(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Explanation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Explanation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("acl") /* Acl com.amazonaws.ec2#Explanation$Acl */ => {
let var_2577 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_acl(var_2577);
}
,
s if s.matches("aclRule") /* AclRule com.amazonaws.ec2#Explanation$AclRule */ => {
let var_2578 =
Some(
crate::xml_deser::deser_structure_analysis_acl_rule(&mut tag)
?
)
;
builder = builder.set_acl_rule(var_2578);
}
,
s if s.matches("address") /* Address com.amazonaws.ec2#Explanation$Address */ => {
let var_2579 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_address(var_2579);
}
,
s if s.matches("addressSet") /* Addresses com.amazonaws.ec2#Explanation$Addresses */ => {
let var_2580 =
Some(
crate::xml_deser::deser_list_ip_address_list(&mut tag)
?
)
;
builder = builder.set_addresses(var_2580);
}
,
s if s.matches("attachedTo") /* AttachedTo com.amazonaws.ec2#Explanation$AttachedTo */ => {
let var_2581 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_attached_to(var_2581);
}
,
s if s.matches("availabilityZoneSet") /* AvailabilityZones com.amazonaws.ec2#Explanation$AvailabilityZones */ => {
let var_2582 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_availability_zones(var_2582);
}
,
s if s.matches("cidrSet") /* Cidrs com.amazonaws.ec2#Explanation$Cidrs */ => {
let var_2583 =
Some(
crate::xml_deser::deser_list_value_string_list(&mut tag)
?
)
;
builder = builder.set_cidrs(var_2583);
}
,
s if s.matches("component") /* Component com.amazonaws.ec2#Explanation$Component */ => {
let var_2584 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_component(var_2584);
}
,
s if s.matches("customerGateway") /* CustomerGateway com.amazonaws.ec2#Explanation$CustomerGateway */ => {
let var_2585 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_customer_gateway(var_2585);
}
,
s if s.matches("destination") /* Destination com.amazonaws.ec2#Explanation$Destination */ => {
let var_2586 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_destination(var_2586);
}
,
s if s.matches("destinationVpc") /* DestinationVpc com.amazonaws.ec2#Explanation$DestinationVpc */ => {
let var_2587 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_destination_vpc(var_2587);
}
,
s if s.matches("direction") /* Direction com.amazonaws.ec2#Explanation$Direction */ => {
let var_2588 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_direction(var_2588);
}
,
s if s.matches("explanationCode") /* ExplanationCode com.amazonaws.ec2#Explanation$ExplanationCode */ => {
let var_2589 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_explanation_code(var_2589);
}
,
s if s.matches("ingressRouteTable") /* IngressRouteTable com.amazonaws.ec2#Explanation$IngressRouteTable */ => {
let var_2590 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_ingress_route_table(var_2590);
}
,
s if s.matches("internetGateway") /* InternetGateway com.amazonaws.ec2#Explanation$InternetGateway */ => {
let var_2591 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_internet_gateway(var_2591);
}
,
s if s.matches("loadBalancerArn") /* LoadBalancerArn com.amazonaws.ec2#Explanation$LoadBalancerArn */ => {
let var_2592 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_load_balancer_arn(var_2592);
}
,
s if s.matches("classicLoadBalancerListener") /* ClassicLoadBalancerListener com.amazonaws.ec2#Explanation$ClassicLoadBalancerListener */ => {
let var_2593 =
Some(
crate::xml_deser::deser_structure_analysis_load_balancer_listener(&mut tag)
?
)
;
builder = builder.set_classic_load_balancer_listener(var_2593);
}
,
s if s.matches("loadBalancerListenerPort") /* LoadBalancerListenerPort com.amazonaws.ec2#Explanation$LoadBalancerListenerPort */ => {
let var_2594 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_load_balancer_listener_port(var_2594);
}
,
s if s.matches("loadBalancerTarget") /* LoadBalancerTarget com.amazonaws.ec2#Explanation$LoadBalancerTarget */ => {
let var_2595 =
Some(
crate::xml_deser::deser_structure_analysis_load_balancer_target(&mut tag)
?
)
;
builder = builder.set_load_balancer_target(var_2595);
}
,
s if s.matches("loadBalancerTargetGroup") /* LoadBalancerTargetGroup com.amazonaws.ec2#Explanation$LoadBalancerTargetGroup */ => {
let var_2596 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_load_balancer_target_group(var_2596);
}
,
s if s.matches("loadBalancerTargetGroupSet") /* LoadBalancerTargetGroups com.amazonaws.ec2#Explanation$LoadBalancerTargetGroups */ => {
let var_2597 =
Some(
crate::xml_deser::deser_list_analysis_component_list(&mut tag)
?
)
;
builder = builder.set_load_balancer_target_groups(var_2597);
}
,
s if s.matches("loadBalancerTargetPort") /* LoadBalancerTargetPort com.amazonaws.ec2#Explanation$LoadBalancerTargetPort */ => {
let var_2598 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_load_balancer_target_port(var_2598);
}
,
s if s.matches("elasticLoadBalancerListener") /* ElasticLoadBalancerListener com.amazonaws.ec2#Explanation$ElasticLoadBalancerListener */ => {
let var_2599 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_elastic_load_balancer_listener(var_2599);
}
,
s if s.matches("missingComponent") /* MissingComponent com.amazonaws.ec2#Explanation$MissingComponent */ => {
let var_2600 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_missing_component(var_2600);
}
,
s if s.matches("natGateway") /* NatGateway com.amazonaws.ec2#Explanation$NatGateway */ => {
let var_2601 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_nat_gateway(var_2601);
}
,
s if s.matches("networkInterface") /* NetworkInterface com.amazonaws.ec2#Explanation$NetworkInterface */ => {
let var_2602 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_network_interface(var_2602);
}
,
s if s.matches("packetField") /* PacketField com.amazonaws.ec2#Explanation$PacketField */ => {
let var_2603 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_packet_field(var_2603);
}
,
s if s.matches("vpcPeeringConnection") /* VpcPeeringConnection com.amazonaws.ec2#Explanation$VpcPeeringConnection */ => {
let var_2604 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpc_peering_connection(var_2604);
}
,
s if s.matches("port") /* Port com.amazonaws.ec2#Explanation$Port */ => {
let var_2605 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_port(var_2605);
}
,
s if s.matches("portRangeSet") /* PortRanges com.amazonaws.ec2#Explanation$PortRanges */ => {
let var_2606 =
Some(
crate::xml_deser::deser_list_port_range_list(&mut tag)
?
)
;
builder = builder.set_port_ranges(var_2606);
}
,
s if s.matches("prefixList") /* PrefixList com.amazonaws.ec2#Explanation$PrefixList */ => {
let var_2607 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_prefix_list(var_2607);
}
,
s if s.matches("protocolSet") /* Protocols com.amazonaws.ec2#Explanation$Protocols */ => {
let var_2608 =
Some(
crate::xml_deser::deser_list_string_list(&mut tag)
?
)
;
builder = builder.set_protocols(var_2608);
}
,
s if s.matches("routeTableRoute") /* RouteTableRoute com.amazonaws.ec2#Explanation$RouteTableRoute */ => {
let var_2609 =
Some(
crate::xml_deser::deser_structure_analysis_route_table_route(&mut tag)
?
)
;
builder = builder.set_route_table_route(var_2609);
}
,
s if s.matches("routeTable") /* RouteTable com.amazonaws.ec2#Explanation$RouteTable */ => {
let var_2610 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_route_table(var_2610);
}
,
s if s.matches("securityGroup") /* SecurityGroup com.amazonaws.ec2#Explanation$SecurityGroup */ => {
let var_2611 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_security_group(var_2611);
}
,
s if s.matches("securityGroupRule") /* SecurityGroupRule com.amazonaws.ec2#Explanation$SecurityGroupRule */ => {
let var_2612 =
Some(
crate::xml_deser::deser_structure_analysis_security_group_rule(&mut tag)
?
)
;
builder = builder.set_security_group_rule(var_2612);
}
,
s if s.matches("securityGroupSet") /* SecurityGroups com.amazonaws.ec2#Explanation$SecurityGroups */ => {
let var_2613 =
Some(
crate::xml_deser::deser_list_analysis_component_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_2613);
}
,
s if s.matches("sourceVpc") /* SourceVpc com.amazonaws.ec2#Explanation$SourceVpc */ => {
let var_2614 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_source_vpc(var_2614);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#Explanation$State */ => {
let var_2615 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_state(var_2615);
}
,
s if s.matches("subnet") /* Subnet com.amazonaws.ec2#Explanation$Subnet */ => {
let var_2616 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_subnet(var_2616);
}
,
s if s.matches("subnetRouteTable") /* SubnetRouteTable com.amazonaws.ec2#Explanation$SubnetRouteTable */ => {
let var_2617 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_subnet_route_table(var_2617);
}
,
s if s.matches("vpc") /* Vpc com.amazonaws.ec2#Explanation$Vpc */ => {
let var_2618 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpc(var_2618);
}
,
s if s.matches("vpcEndpoint") /* VpcEndpoint com.amazonaws.ec2#Explanation$VpcEndpoint */ => {
let var_2619 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpc_endpoint(var_2619);
}
,
s if s.matches("vpnConnection") /* VpnConnection com.amazonaws.ec2#Explanation$VpnConnection */ => {
let var_2620 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpn_connection(var_2620);
}
,
s if s.matches("vpnGateway") /* VpnGateway com.amazonaws.ec2#Explanation$VpnGateway */ => {
let var_2621 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_vpn_gateway(var_2621);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_alternate_path_hint(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AlternatePathHint, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AlternatePathHint::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("componentId") /* ComponentId com.amazonaws.ec2#AlternatePathHint$ComponentId */ => {
let var_2622 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_component_id(var_2622);
}
,
s if s.matches("componentArn") /* ComponentArn com.amazonaws.ec2#AlternatePathHint$ComponentArn */ => {
let var_2623 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_component_arn(var_2623);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_cidr_block(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6CidrBlock, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6CidrBlock::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6CidrBlock") /* Ipv6CidrBlock com.amazonaws.ec2#Ipv6CidrBlock$Ipv6CidrBlock */ => {
let var_2624 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_cidr_block(var_2624);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_cidr_block(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CidrBlock, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CidrBlock::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrBlock") /* CidrBlock com.amazonaws.ec2#CidrBlock$CidrBlock */ => {
let var_2625 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_block(var_2625);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_count(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceCount, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceCount::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#InstanceCount$InstanceCount */ => {
let var_2626 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_count(var_2626);
}
,
s if s.matches("state") /* State com.amazonaws.ec2#InstanceCount$State */ => {
let var_2627 =
Some(
Result::<crate::model::ListingState, smithy_xml::decode::XmlError>::Ok(
crate::model::ListingState::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_state(var_2627);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_price_schedule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PriceSchedule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PriceSchedule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("active") /* Active com.amazonaws.ec2#PriceSchedule$Active */ => {
let var_2628 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_active(var_2628);
}
,
s if s.matches("currencyCode") /* CurrencyCode com.amazonaws.ec2#PriceSchedule$CurrencyCode */ => {
let var_2629 =
Some(
Result::<crate::model::CurrencyCodeValues, smithy_xml::decode::XmlError>::Ok(
crate::model::CurrencyCodeValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_currency_code(var_2629);
}
,
s if s.matches("price") /* Price com.amazonaws.ec2#PriceSchedule$Price */ => {
let var_2630 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_price(var_2630);
}
,
s if s.matches("term") /* Term com.amazonaws.ec2#PriceSchedule$Term */ => {
let var_2631 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_term(var_2631);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_dhcp_configuration_value_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AttributeValue>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DhcpConfigurationValueList$member */ => {
out.push(
crate::xml_deser::deser_structure_attribute_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_fleet_launch_template_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetLaunchTemplateSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetLaunchTemplateSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateId") /* LaunchTemplateId com.amazonaws.ec2#FleetLaunchTemplateSpecification$LaunchTemplateId */ => {
let var_2632 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_id(var_2632);
}
,
s if s.matches("launchTemplateName") /* LaunchTemplateName com.amazonaws.ec2#FleetLaunchTemplateSpecification$LaunchTemplateName */ => {
let var_2633 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_launch_template_name(var_2633);
}
,
s if s.matches("version") /* Version com.amazonaws.ec2#FleetLaunchTemplateSpecification$Version */ => {
let var_2634 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_version(var_2634);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fleet_launch_template_overrides(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetLaunchTemplateOverrides, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetLaunchTemplateOverrides::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#FleetLaunchTemplateOverrides$InstanceType */ => {
let var_2635 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2635);
}
,
s if s.matches("maxPrice") /* MaxPrice com.amazonaws.ec2#FleetLaunchTemplateOverrides$MaxPrice */ => {
let var_2636 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_max_price(var_2636);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#FleetLaunchTemplateOverrides$SubnetId */ => {
let var_2637 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2637);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#FleetLaunchTemplateOverrides$AvailabilityZone */ => {
let var_2638 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2638);
}
,
s if s.matches("weightedCapacity") /* WeightedCapacity com.amazonaws.ec2#FleetLaunchTemplateOverrides$WeightedCapacity */ => {
let var_2639 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_weighted_capacity(var_2639);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#FleetLaunchTemplateOverrides$Priority */ => {
let var_2640 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_priority(var_2640);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#FleetLaunchTemplateOverrides$Placement */ => {
let var_2641 =
Some(
crate::xml_deser::deser_structure_placement_response(&mut tag)
?
)
;
builder = builder.set_placement(var_2641);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_icmp_type_code(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IcmpTypeCode, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IcmpTypeCode::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#IcmpTypeCode$Code */ => {
let var_2642 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_code(var_2642);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#IcmpTypeCode$Type */ => {
let var_2643 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_type(var_2643);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_port_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PortRange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PortRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("from") /* From com.amazonaws.ec2#PortRange$From */ => {
let var_2644 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_from(var_2644);
}
,
s if s.matches("to") /* To com.amazonaws.ec2#PortRange$To */ => {
let var_2645 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_to(var_2645);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_transit_gateway_attachment_bgp_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TransitGatewayAttachmentBgpConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TransitGatewayAttachmentBgpConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("transitGatewayAsn") /* TransitGatewayAsn com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$TransitGatewayAsn */ => {
let var_2646 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_transit_gateway_asn(var_2646);
}
,
s if s.matches("peerAsn") /* PeerAsn com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$PeerAsn */ => {
let var_2647 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_peer_asn(var_2647);
}
,
s if s.matches("transitGatewayAddress") /* TransitGatewayAddress com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$TransitGatewayAddress */ => {
let var_2648 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_address(var_2648);
}
,
s if s.matches("peerAddress") /* PeerAddress com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$PeerAddress */ => {
let var_2649 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_peer_address(var_2649);
}
,
s if s.matches("bgpStatus") /* BgpStatus com.amazonaws.ec2#TransitGatewayAttachmentBgpConfiguration$BgpStatus */ => {
let var_2650 =
Some(
Result::<crate::model::BgpStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::BgpStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_bgp_status(var_2650);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_tunnel_option(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TunnelOption, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TunnelOption::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("outsideIpAddress") /* OutsideIpAddress com.amazonaws.ec2#TunnelOption$OutsideIpAddress */ => {
let var_2651 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_outside_ip_address(var_2651);
}
,
s if s.matches("tunnelInsideCidr") /* TunnelInsideCidr com.amazonaws.ec2#TunnelOption$TunnelInsideCidr */ => {
let var_2652 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_tunnel_inside_cidr(var_2652);
}
,
s if s.matches("tunnelInsideIpv6Cidr") /* TunnelInsideIpv6Cidr com.amazonaws.ec2#TunnelOption$TunnelInsideIpv6Cidr */ => {
let var_2653 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_tunnel_inside_ipv6_cidr(var_2653);
}
,
s if s.matches("preSharedKey") /* PreSharedKey com.amazonaws.ec2#TunnelOption$PreSharedKey */ => {
let var_2654 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_pre_shared_key(var_2654);
}
,
s if s.matches("phase1LifetimeSeconds") /* Phase1LifetimeSeconds com.amazonaws.ec2#TunnelOption$Phase1LifetimeSeconds */ => {
let var_2655 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_phase1_lifetime_seconds(var_2655);
}
,
s if s.matches("phase2LifetimeSeconds") /* Phase2LifetimeSeconds com.amazonaws.ec2#TunnelOption$Phase2LifetimeSeconds */ => {
let var_2656 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_phase2_lifetime_seconds(var_2656);
}
,
s if s.matches("rekeyMarginTimeSeconds") /* RekeyMarginTimeSeconds com.amazonaws.ec2#TunnelOption$RekeyMarginTimeSeconds */ => {
let var_2657 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rekey_margin_time_seconds(var_2657);
}
,
s if s.matches("rekeyFuzzPercentage") /* RekeyFuzzPercentage com.amazonaws.ec2#TunnelOption$RekeyFuzzPercentage */ => {
let var_2658 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rekey_fuzz_percentage(var_2658);
}
,
s if s.matches("replayWindowSize") /* ReplayWindowSize com.amazonaws.ec2#TunnelOption$ReplayWindowSize */ => {
let var_2659 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_replay_window_size(var_2659);
}
,
s if s.matches("dpdTimeoutSeconds") /* DpdTimeoutSeconds com.amazonaws.ec2#TunnelOption$DpdTimeoutSeconds */ => {
let var_2660 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_dpd_timeout_seconds(var_2660);
}
,
s if s.matches("dpdTimeoutAction") /* DpdTimeoutAction com.amazonaws.ec2#TunnelOption$DpdTimeoutAction */ => {
let var_2661 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_dpd_timeout_action(var_2661);
}
,
s if s.matches("phase1EncryptionAlgorithmSet") /* Phase1EncryptionAlgorithms com.amazonaws.ec2#TunnelOption$Phase1EncryptionAlgorithms */ => {
let var_2662 =
Some(
crate::xml_deser::deser_list_phase1_encryption_algorithms_list(&mut tag)
?
)
;
builder = builder.set_phase1_encryption_algorithms(var_2662);
}
,
s if s.matches("phase2EncryptionAlgorithmSet") /* Phase2EncryptionAlgorithms com.amazonaws.ec2#TunnelOption$Phase2EncryptionAlgorithms */ => {
let var_2663 =
Some(
crate::xml_deser::deser_list_phase2_encryption_algorithms_list(&mut tag)
?
)
;
builder = builder.set_phase2_encryption_algorithms(var_2663);
}
,
s if s.matches("phase1IntegrityAlgorithmSet") /* Phase1IntegrityAlgorithms com.amazonaws.ec2#TunnelOption$Phase1IntegrityAlgorithms */ => {
let var_2664 =
Some(
crate::xml_deser::deser_list_phase1_integrity_algorithms_list(&mut tag)
?
)
;
builder = builder.set_phase1_integrity_algorithms(var_2664);
}
,
s if s.matches("phase2IntegrityAlgorithmSet") /* Phase2IntegrityAlgorithms com.amazonaws.ec2#TunnelOption$Phase2IntegrityAlgorithms */ => {
let var_2665 =
Some(
crate::xml_deser::deser_list_phase2_integrity_algorithms_list(&mut tag)
?
)
;
builder = builder.set_phase2_integrity_algorithms(var_2665);
}
,
s if s.matches("phase1DHGroupNumberSet") /* Phase1DHGroupNumbers com.amazonaws.ec2#TunnelOption$Phase1DHGroupNumbers */ => {
let var_2666 =
Some(
crate::xml_deser::deser_list_phase1_dh_group_numbers_list(&mut tag)
?
)
;
builder = builder.set_phase1_dh_group_numbers(var_2666);
}
,
s if s.matches("phase2DHGroupNumberSet") /* Phase2DHGroupNumbers com.amazonaws.ec2#TunnelOption$Phase2DHGroupNumbers */ => {
let var_2667 =
Some(
crate::xml_deser::deser_list_phase2_dh_group_numbers_list(&mut tag)
?
)
;
builder = builder.set_phase2_dh_group_numbers(var_2667);
}
,
s if s.matches("ikeVersionSet") /* IkeVersions com.amazonaws.ec2#TunnelOption$IkeVersions */ => {
let var_2668 =
Some(
crate::xml_deser::deser_list_ike_versions_list(&mut tag)
?
)
;
builder = builder.set_ike_versions(var_2668);
}
,
s if s.matches("startupAction") /* StartupAction com.amazonaws.ec2#TunnelOption$StartupAction */ => {
let var_2669 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_startup_action(var_2669);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_account_attribute_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AccountAttributeValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AccountAttributeValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attributeValue") /* AttributeValue com.amazonaws.ec2#AccountAttributeValue$AttributeValue */ => {
let var_2670 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_attribute_value(var_2670);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_availability_zone_message(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AvailabilityZoneMessage, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AvailabilityZoneMessage::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("message") /* Message com.amazonaws.ec2#AvailabilityZoneMessage$Message */ => {
let var_2671 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2671);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_associated_target_network(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AssociatedTargetNetwork, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AssociatedTargetNetwork::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkId") /* NetworkId com.amazonaws.ec2#AssociatedTargetNetwork$NetworkId */ => {
let var_2672 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_id(var_2672);
}
,
s if s.matches("networkType") /* NetworkType com.amazonaws.ec2#AssociatedTargetNetwork$NetworkType */ => {
let var_2673 =
Some(
Result::<crate::model::AssociatedNetworkType, smithy_xml::decode::XmlError>::Ok(
crate::model::AssociatedNetworkType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_network_type(var_2673);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_authentication(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnAuthentication, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnAuthentication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("type") /* Type com.amazonaws.ec2#ClientVpnAuthentication$Type */ => {
let var_2674 =
Some(
Result::<crate::model::ClientVpnAuthenticationType, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnAuthenticationType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_2674);
}
,
s if s.matches("activeDirectory") /* ActiveDirectory com.amazonaws.ec2#ClientVpnAuthentication$ActiveDirectory */ => {
let var_2675 =
Some(
crate::xml_deser::deser_structure_directory_service_authentication(&mut tag)
?
)
;
builder = builder.set_active_directory(var_2675);
}
,
s if s.matches("mutualAuthentication") /* MutualAuthentication com.amazonaws.ec2#ClientVpnAuthentication$MutualAuthentication */ => {
let var_2676 =
Some(
crate::xml_deser::deser_structure_certificate_authentication(&mut tag)
?
)
;
builder = builder.set_mutual_authentication(var_2676);
}
,
s if s.matches("federatedAuthentication") /* FederatedAuthentication com.amazonaws.ec2#ClientVpnAuthentication$FederatedAuthentication */ => {
let var_2677 =
Some(
crate::xml_deser::deser_structure_federated_authentication(&mut tag)
?
)
;
builder = builder.set_federated_authentication(var_2677);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_client_vpn_endpoint_attribute_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClientVpnEndpointAttributeStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClientVpnEndpointAttributeStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#ClientVpnEndpointAttributeStatus$Code */ => {
let var_2678 =
Some(
Result::<crate::model::ClientVpnEndpointAttributeStatusCode, smithy_xml::decode::XmlError>::Ok(
crate::model::ClientVpnEndpointAttributeStatusCode::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_code(var_2678);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#ClientVpnEndpointAttributeStatus$Message */ => {
let var_2679 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2679);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fleet_launch_template_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetLaunchTemplateConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetLaunchTemplateConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateSpecification") /* LaunchTemplateSpecification com.amazonaws.ec2#FleetLaunchTemplateConfig$LaunchTemplateSpecification */ => {
let var_2680 =
Some(
crate::xml_deser::deser_structure_fleet_launch_template_specification(&mut tag)
?
)
;
builder = builder.set_launch_template_specification(var_2680);
}
,
s if s.matches("overrides") /* Overrides com.amazonaws.ec2#FleetLaunchTemplateConfig$Overrides */ => {
let var_2681 =
Some(
crate::xml_deser::deser_list_fleet_launch_template_overrides_list(&mut tag)
?
)
;
builder = builder.set_overrides(var_2681);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fleet_spot_maintenance_strategies(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetSpotMaintenanceStrategies, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetSpotMaintenanceStrategies::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityRebalance") /* CapacityRebalance com.amazonaws.ec2#FleetSpotMaintenanceStrategies$CapacityRebalance */ => {
let var_2682 =
Some(
crate::xml_deser::deser_structure_fleet_spot_capacity_rebalance(&mut tag)
?
)
;
builder = builder.set_capacity_rebalance(var_2682);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_capacity_reservation_options(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CapacityReservationOptions, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CapacityReservationOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("usageStrategy") /* UsageStrategy com.amazonaws.ec2#CapacityReservationOptions$UsageStrategy */ => {
let var_2683 =
Some(
Result::<crate::model::FleetCapacityReservationUsageStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetCapacityReservationUsageStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_usage_strategy(var_2683);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_describe_fleet_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DescribeFleetError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DescribeFleetError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateAndOverrides") /* LaunchTemplateAndOverrides com.amazonaws.ec2#DescribeFleetError$LaunchTemplateAndOverrides */ => {
let var_2684 =
Some(
crate::xml_deser::deser_structure_launch_template_and_overrides_response(&mut tag)
?
)
;
builder = builder.set_launch_template_and_overrides(var_2684);
}
,
s if s.matches("lifecycle") /* Lifecycle com.amazonaws.ec2#DescribeFleetError$Lifecycle */ => {
let var_2685 =
Some(
Result::<crate::model::InstanceLifecycle, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceLifecycle::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_lifecycle(var_2685);
}
,
s if s.matches("errorCode") /* ErrorCode com.amazonaws.ec2#DescribeFleetError$ErrorCode */ => {
let var_2686 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_error_code(var_2686);
}
,
s if s.matches("errorMessage") /* ErrorMessage com.amazonaws.ec2#DescribeFleetError$ErrorMessage */ => {
let var_2687 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_error_message(var_2687);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_describe_fleets_instances(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DescribeFleetsInstances, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DescribeFleetsInstances::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateAndOverrides") /* LaunchTemplateAndOverrides com.amazonaws.ec2#DescribeFleetsInstances$LaunchTemplateAndOverrides */ => {
let var_2688 =
Some(
crate::xml_deser::deser_structure_launch_template_and_overrides_response(&mut tag)
?
)
;
builder = builder.set_launch_template_and_overrides(var_2688);
}
,
s if s.matches("lifecycle") /* Lifecycle com.amazonaws.ec2#DescribeFleetsInstances$Lifecycle */ => {
let var_2689 =
Some(
Result::<crate::model::InstanceLifecycle, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceLifecycle::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_lifecycle(var_2689);
}
,
s if s.matches("instanceIds") /* InstanceIds com.amazonaws.ec2#DescribeFleetsInstances$InstanceIds */ => {
let var_2690 =
Some(
crate::xml_deser::deser_list_instance_ids_set(&mut tag)
?
)
;
builder = builder.set_instance_ids(var_2690);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#DescribeFleetsInstances$InstanceType */ => {
let var_2691 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2691);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#DescribeFleetsInstances$Platform */ => {
let var_2692 =
Some(
Result::<crate::model::PlatformValues, smithy_xml::decode::XmlError>::Ok(
crate::model::PlatformValues::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_platform(var_2692);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_available_instance_capacity_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceCapacity>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AvailableInstanceCapacityList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_capacity(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_host_instance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::HostInstance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::HostInstance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#HostInstance$InstanceId */ => {
let var_2693 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2693);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#HostInstance$InstanceType */ => {
let var_2694 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_2694);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#HostInstance$OwnerId */ => {
let var_2695 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_2695);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_status_details_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceStatusDetails>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceStatusDetailsList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_status_details(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_architecture_type_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ArchitectureType>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ArchitectureTypeList$member */ => {
out.push(
Result::<crate::model::ArchitectureType, smithy_xml::decode::XmlError>::Ok(
crate::model::ArchitectureType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_core_count_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<i32>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#CoreCountList$member */ => {
out.push(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#CoreCount`)"))
}
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_threads_per_core_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<i32>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ThreadsPerCoreList$member */ => {
out.push(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#ThreadsPerCore`)"))
}
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_disk_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::DiskInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#DiskInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_disk_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_ebs_optimized_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EbsOptimizedInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EbsOptimizedInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("baselineBandwidthInMbps") /* BaselineBandwidthInMbps com.amazonaws.ec2#EbsOptimizedInfo$BaselineBandwidthInMbps */ => {
let var_2696 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#BaselineBandwidthInMbps`)"))
}
?
)
;
builder = builder.set_baseline_bandwidth_in_mbps(var_2696);
}
,
s if s.matches("baselineThroughputInMBps") /* BaselineThroughputInMBps com.amazonaws.ec2#EbsOptimizedInfo$BaselineThroughputInMBps */ => {
let var_2697 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#BaselineThroughputInMBps`)"))
}
?
)
;
builder = builder.set_baseline_throughput_in_m_bps(var_2697);
}
,
s if s.matches("baselineIops") /* BaselineIops com.amazonaws.ec2#EbsOptimizedInfo$BaselineIops */ => {
let var_2698 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#BaselineIops`)"))
}
?
)
;
builder = builder.set_baseline_iops(var_2698);
}
,
s if s.matches("maximumBandwidthInMbps") /* MaximumBandwidthInMbps com.amazonaws.ec2#EbsOptimizedInfo$MaximumBandwidthInMbps */ => {
let var_2699 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaximumBandwidthInMbps`)"))
}
?
)
;
builder = builder.set_maximum_bandwidth_in_mbps(var_2699);
}
,
s if s.matches("maximumThroughputInMBps") /* MaximumThroughputInMBps com.amazonaws.ec2#EbsOptimizedInfo$MaximumThroughputInMBps */ => {
let var_2700 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#MaximumThroughputInMBps`)"))
}
?
)
;
builder = builder.set_maximum_throughput_in_m_bps(var_2700);
}
,
s if s.matches("maximumIops") /* MaximumIops com.amazonaws.ec2#EbsOptimizedInfo$MaximumIops */ => {
let var_2701 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaximumIops`)"))
}
?
)
;
builder = builder.set_maximum_iops(var_2701);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_network_card_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::NetworkCardInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#NetworkCardInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_network_card_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_efa_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EfaInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EfaInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("maximumEfaInterfaces") /* MaximumEfaInterfaces com.amazonaws.ec2#EfaInfo$MaximumEfaInterfaces */ => {
let var_2702 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaximumEfaInterfaces`)"))
}
?
)
;
builder = builder.set_maximum_efa_interfaces(var_2702);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_gpu_device_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::GpuDeviceInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#GpuDeviceInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_gpu_device_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_fpga_device_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FpgaDeviceInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FpgaDeviceInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_fpga_device_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_placement_group_strategy_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PlacementGroupStrategy>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PlacementGroupStrategyList$member */ => {
out.push(
Result::<crate::model::PlacementGroupStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::PlacementGroupStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_inference_device_info_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InferenceDeviceInfo>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("member") /* member com.amazonaws.ec2#InferenceDeviceInfoList$member */ => {
out.push(
crate::xml_deser::deser_structure_inference_device_info(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_pool_cidr_block(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PoolCidrBlock, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PoolCidrBlock::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("poolCidrBlock") /* Cidr com.amazonaws.ec2#PoolCidrBlock$Cidr */ => {
let var_2703 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_2703);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_public_ipv4_pool_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PublicIpv4PoolRange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PublicIpv4PoolRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("firstAddress") /* FirstAddress com.amazonaws.ec2#PublicIpv4PoolRange$FirstAddress */ => {
let var_2704 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_first_address(var_2704);
}
,
s if s.matches("lastAddress") /* LastAddress com.amazonaws.ec2#PublicIpv4PoolRange$LastAddress */ => {
let var_2705 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_last_address(var_2705);
}
,
s if s.matches("addressCount") /* AddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AddressCount */ => {
let var_2706 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_address_count(var_2706);
}
,
s if s.matches("availableAddressCount") /* AvailableAddressCount com.amazonaws.ec2#PublicIpv4PoolRange$AvailableAddressCount */ => {
let var_2707 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_address_count(var_2707);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_recurring_charge(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RecurringCharge, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::RecurringCharge::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("amount") /* Amount com.amazonaws.ec2#RecurringCharge$Amount */ => {
let var_2708 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_amount(var_2708);
}
,
s if s.matches("frequency") /* Frequency com.amazonaws.ec2#RecurringCharge$Frequency */ => {
let var_2709 =
Some(
Result::<crate::model::RecurringChargeFrequency, smithy_xml::decode::XmlError>::Ok(
crate::model::RecurringChargeFrequency::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_frequency(var_2709);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_modification_result(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesModificationResult, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesModificationResult::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#ReservedInstancesModificationResult$ReservedInstancesId */ => {
let var_2710 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_2710);
}
,
s if s.matches("targetConfiguration") /* TargetConfiguration com.amazonaws.ec2#ReservedInstancesModificationResult$TargetConfiguration */ => {
let var_2711 =
Some(
crate::xml_deser::deser_structure_reserved_instances_configuration(&mut tag)
?
)
;
builder = builder.set_target_configuration(var_2711);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_id(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesId, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesId::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("reservedInstancesId") /* ReservedInstancesId com.amazonaws.ec2#ReservedInstancesId$ReservedInstancesId */ => {
let var_2712 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_reserved_instances_id(var_2712);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_pricing_detail(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PricingDetail, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PricingDetail::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("count") /* Count com.amazonaws.ec2#PricingDetail$Count */ => {
let var_2713 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_count(var_2713);
}
,
s if s.matches("price") /* Price com.amazonaws.ec2#PricingDetail$Price */ => {
let var_2714 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_price(var_2714);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_occurrence_day_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<i32>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#OccurrenceDaySet$member */ => {
out.push(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_spot_maintenance_strategies(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotMaintenanceStrategies, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotMaintenanceStrategies::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("capacityRebalance") /* CapacityRebalance com.amazonaws.ec2#SpotMaintenanceStrategies$CapacityRebalance */ => {
let var_2715 =
Some(
crate::xml_deser::deser_structure_spot_capacity_rebalance(&mut tag)
?
)
;
builder = builder.set_capacity_rebalance(var_2715);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_launch_specs_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SpotFleetLaunchSpecification>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchSpecsList$member */ => {
out.push(
crate::xml_deser::deser_structure_spot_fleet_launch_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_config_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchTemplateConfig>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateConfigList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_config(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_load_balancers_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LoadBalancersConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LoadBalancersConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("classicLoadBalancersConfig") /* ClassicLoadBalancersConfig com.amazonaws.ec2#LoadBalancersConfig$ClassicLoadBalancersConfig */ => {
let var_2716 =
Some(
crate::xml_deser::deser_structure_classic_load_balancers_config(&mut tag)
?
)
;
builder = builder.set_classic_load_balancers_config(var_2716);
}
,
s if s.matches("targetGroupsConfig") /* TargetGroupsConfig com.amazonaws.ec2#LoadBalancersConfig$TargetGroupsConfig */ => {
let var_2717 =
Some(
crate::xml_deser::deser_structure_target_groups_config(&mut tag)
?
)
;
builder = builder.set_target_groups_config(var_2717);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_tag_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TagSpecification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TagSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_tag_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_iam_instance_profile_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IamInstanceProfileSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IamInstanceProfileSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("arn") /* Arn com.amazonaws.ec2#IamInstanceProfileSpecification$Arn */ => {
let var_2718 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_2718);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#IamInstanceProfileSpecification$Name */ => {
let var_2719 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2719);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_network_interface_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::InstanceNetworkInterfaceSpecification>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceNetworkInterfaceSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_network_interface_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_spot_placement(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotPlacement, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotPlacement::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#SpotPlacement$AvailabilityZone */ => {
let var_2720 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2720);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#SpotPlacement$GroupName */ => {
let var_2721 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2721);
}
,
s if s.matches("tenancy") /* Tenancy com.amazonaws.ec2#SpotPlacement$Tenancy */ => {
let var_2722 =
Some(
Result::<crate::model::Tenancy, smithy_xml::decode::XmlError>::Ok(
crate::model::Tenancy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tenancy(var_2722);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_run_instances_monitoring_enabled(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::RunInstancesMonitoringEnabled, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::RunInstancesMonitoringEnabled::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#RunInstancesMonitoringEnabled$Enabled */ => {
let var_2723 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2723);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_stale_ip_permission(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::StaleIpPermission, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::StaleIpPermission::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("fromPort") /* FromPort com.amazonaws.ec2#StaleIpPermission$FromPort */ => {
let var_2724 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_from_port(var_2724);
}
,
s if s.matches("ipProtocol") /* IpProtocol com.amazonaws.ec2#StaleIpPermission$IpProtocol */ => {
let var_2725 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_protocol(var_2725);
}
,
s if s.matches("ipRanges") /* IpRanges com.amazonaws.ec2#StaleIpPermission$IpRanges */ => {
let var_2726 =
Some(
crate::xml_deser::deser_list_ip_ranges(&mut tag)
?
)
;
builder = builder.set_ip_ranges(var_2726);
}
,
s if s.matches("prefixListIds") /* PrefixListIds com.amazonaws.ec2#StaleIpPermission$PrefixListIds */ => {
let var_2727 =
Some(
crate::xml_deser::deser_list_prefix_list_id_set(&mut tag)
?
)
;
builder = builder.set_prefix_list_ids(var_2727);
}
,
s if s.matches("toPort") /* ToPort com.amazonaws.ec2#StaleIpPermission$ToPort */ => {
let var_2728 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_to_port(var_2728);
}
,
s if s.matches("groups") /* UserIdGroupPairs com.amazonaws.ec2#StaleIpPermission$UserIdGroupPairs */ => {
let var_2729 =
Some(
crate::xml_deser::deser_list_user_id_group_pair_set(&mut tag)
?
)
;
builder = builder.set_user_id_group_pairs(var_2729);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_volume_status_action(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusAction, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusAction::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#VolumeStatusAction$Code */ => {
let var_2730 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2730);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#VolumeStatusAction$Description */ => {
let var_2731 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2731);
}
,
s if s.matches("eventId") /* EventId com.amazonaws.ec2#VolumeStatusAction$EventId */ => {
let var_2732 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_id(var_2732);
}
,
s if s.matches("eventType") /* EventType com.amazonaws.ec2#VolumeStatusAction$EventType */ => {
let var_2733 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_type(var_2733);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_volume_status_event(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusEvent, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusEvent::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#VolumeStatusEvent$Description */ => {
let var_2734 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2734);
}
,
s if s.matches("eventId") /* EventId com.amazonaws.ec2#VolumeStatusEvent$EventId */ => {
let var_2735 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_id(var_2735);
}
,
s if s.matches("eventType") /* EventType com.amazonaws.ec2#VolumeStatusEvent$EventType */ => {
let var_2736 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_event_type(var_2736);
}
,
s if s.matches("notAfter") /* NotAfter com.amazonaws.ec2#VolumeStatusEvent$NotAfter */ => {
let var_2737 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_not_after(var_2737);
}
,
s if s.matches("notBefore") /* NotBefore com.amazonaws.ec2#VolumeStatusEvent$NotBefore */ => {
let var_2738 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#MillisecondDateTime`)"))
?
)
;
builder = builder.set_not_before(var_2738);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeStatusEvent$InstanceId */ => {
let var_2739 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2739);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_volume_status_details_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::VolumeStatusDetails>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#VolumeStatusDetailsList$member */ => {
out.push(
crate::xml_deser::deser_structure_volume_status_details(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_volume_status_attachment_status(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusAttachmentStatus, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusAttachmentStatus::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ioPerformance") /* IoPerformance com.amazonaws.ec2#VolumeStatusAttachmentStatus$IoPerformance */ => {
let var_2740 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_io_performance(var_2740);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#VolumeStatusAttachmentStatus$InstanceId */ => {
let var_2741 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2741);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_private_dns_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateDnsDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateDnsDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#PrivateDnsDetails$PrivateDnsName */ => {
let var_2742 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2742);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disable_fast_snapshot_restore_state_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DisableFastSnapshotRestoreStateErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DisableFastSnapshotRestoreStateErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#DisableFastSnapshotRestoreStateErrorItem$AvailabilityZone */ => {
let var_2743 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2743);
}
,
s if s.matches("error") /* Error com.amazonaws.ec2#DisableFastSnapshotRestoreStateErrorItem$Error */ => {
let var_2744 =
Some(
crate::xml_deser::deser_structure_disable_fast_snapshot_restore_state_error(&mut tag)
?
)
;
builder = builder.set_error(var_2744);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_enable_fast_snapshot_restore_state_error_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EnableFastSnapshotRestoreStateErrorItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EnableFastSnapshotRestoreStateErrorItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#EnableFastSnapshotRestoreStateErrorItem$AvailabilityZone */ => {
let var_2745 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2745);
}
,
s if s.matches("error") /* Error com.amazonaws.ec2#EnableFastSnapshotRestoreStateErrorItem$Error */ => {
let var_2746 =
Some(
crate::xml_deser::deser_structure_enable_fast_snapshot_restore_state_error(&mut tag)
?
)
;
builder = builder.set_error(var_2746);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_ebs_block_device(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateEbsBlockDevice, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateEbsBlockDevice::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("encrypted") /* Encrypted com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Encrypted */ => {
let var_2747 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_encrypted(var_2747);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$DeleteOnTermination */ => {
let var_2748 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2748);
}
,
s if s.matches("iops") /* Iops com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Iops */ => {
let var_2749 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_iops(var_2749);
}
,
s if s.matches("kmsKeyId") /* KmsKeyId com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$KmsKeyId */ => {
let var_2750 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kms_key_id(var_2750);
}
,
s if s.matches("snapshotId") /* SnapshotId com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$SnapshotId */ => {
let var_2751 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_snapshot_id(var_2751);
}
,
s if s.matches("volumeSize") /* VolumeSize com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$VolumeSize */ => {
let var_2752 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_volume_size(var_2752);
}
,
s if s.matches("volumeType") /* VolumeType com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$VolumeType */ => {
let var_2753 =
Some(
Result::<crate::model::VolumeType, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_volume_type(var_2753);
}
,
s if s.matches("throughput") /* Throughput com.amazonaws.ec2#LaunchTemplateEbsBlockDevice$Throughput */ => {
let var_2754 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_throughput(var_2754);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_group_id_string_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupId") /* member com.amazonaws.ec2#GroupIdStringList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_ipv6_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceIpv6Address>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIpv6AddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_ipv6_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_private_ip_address_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PrivateIpAddressSpecification>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrivateIpAddressSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_private_ip_address_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv4_prefix_list_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Ipv4PrefixSpecificationResponse>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv4PrefixListResponse$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv4_prefix_specification_response(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_prefix_list_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Ipv6PrefixSpecificationResponse>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6PrefixListResponse$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_prefix_specification_response(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_import_instance_volume_detail_item(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ImportInstanceVolumeDetailItem, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ImportInstanceVolumeDetailItem::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ImportInstanceVolumeDetailItem$AvailabilityZone */ => {
let var_2755 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2755);
}
,
s if s.matches("bytesConverted") /* BytesConverted com.amazonaws.ec2#ImportInstanceVolumeDetailItem$BytesConverted */ => {
let var_2756 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#Long`)"))
}
?
)
;
builder = builder.set_bytes_converted(var_2756);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#ImportInstanceVolumeDetailItem$Description */ => {
let var_2757 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2757);
}
,
s if s.matches("image") /* Image com.amazonaws.ec2#ImportInstanceVolumeDetailItem$Image */ => {
let var_2758 =
Some(
crate::xml_deser::deser_structure_disk_image_description(&mut tag)
?
)
;
builder = builder.set_image(var_2758);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#ImportInstanceVolumeDetailItem$Status */ => {
let var_2759 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_2759);
}
,
s if s.matches("statusMessage") /* StatusMessage com.amazonaws.ec2#ImportInstanceVolumeDetailItem$StatusMessage */ => {
let var_2760 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_message(var_2760);
}
,
s if s.matches("volume") /* Volume com.amazonaws.ec2#ImportInstanceVolumeDetailItem$Volume */ => {
let var_2761 =
Some(
crate::xml_deser::deser_structure_disk_image_volume_description(&mut tag)
?
)
;
builder = builder.set_volume(var_2761);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ip_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IpRange, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IpRange::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrIp") /* CidrIp com.amazonaws.ec2#IpRange$CidrIp */ => {
let var_2762 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_ip(var_2762);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#IpRange$Description */ => {
let var_2763 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2763);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_range(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6Range, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6Range::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidrIpv6") /* CidrIpv6 com.amazonaws.ec2#Ipv6Range$CidrIpv6 */ => {
let var_2764 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr_ipv6(var_2764);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#Ipv6Range$Description */ => {
let var_2765 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2765);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_prefix_list_id(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrefixListId, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrefixListId::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#PrefixListId$Description */ => {
let var_2766 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2766);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#PrefixListId$PrefixListId */ => {
let var_2767 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_2767);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_user_id_group_pair(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::UserIdGroupPair, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::UserIdGroupPair::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("description") /* Description com.amazonaws.ec2#UserIdGroupPair$Description */ => {
let var_2768 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2768);
}
,
s if s.matches("groupId") /* GroupId com.amazonaws.ec2#UserIdGroupPair$GroupId */ => {
let var_2769 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_id(var_2769);
}
,
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#UserIdGroupPair$GroupName */ => {
let var_2770 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2770);
}
,
s if s.matches("peeringStatus") /* PeeringStatus com.amazonaws.ec2#UserIdGroupPair$PeeringStatus */ => {
let var_2771 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_peering_status(var_2771);
}
,
s if s.matches("userId") /* UserId com.amazonaws.ec2#UserIdGroupPair$UserId */ => {
let var_2772 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_id(var_2772);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#UserIdGroupPair$VpcId */ => {
let var_2773 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2773);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#UserIdGroupPair$VpcPeeringConnectionId */ => {
let var_2774 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_2774);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_elastic_gpu_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ElasticGpuAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ElasticGpuAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("elasticGpuId") /* ElasticGpuId com.amazonaws.ec2#ElasticGpuAssociation$ElasticGpuId */ => {
let var_2775 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_id(var_2775);
}
,
s if s.matches("elasticGpuAssociationId") /* ElasticGpuAssociationId com.amazonaws.ec2#ElasticGpuAssociation$ElasticGpuAssociationId */ => {
let var_2776 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_association_id(var_2776);
}
,
s if s.matches("elasticGpuAssociationState") /* ElasticGpuAssociationState com.amazonaws.ec2#ElasticGpuAssociation$ElasticGpuAssociationState */ => {
let var_2777 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_association_state(var_2777);
}
,
s if s.matches("elasticGpuAssociationTime") /* ElasticGpuAssociationTime com.amazonaws.ec2#ElasticGpuAssociation$ElasticGpuAssociationTime */ => {
let var_2778 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_gpu_association_time(var_2778);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_elastic_inference_accelerator_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ElasticInferenceAcceleratorAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ElasticInferenceAcceleratorAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("elasticInferenceAcceleratorArn") /* ElasticInferenceAcceleratorArn com.amazonaws.ec2#ElasticInferenceAcceleratorAssociation$ElasticInferenceAcceleratorArn */ => {
let var_2779 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_inference_accelerator_arn(var_2779);
}
,
s if s.matches("elasticInferenceAcceleratorAssociationId") /* ElasticInferenceAcceleratorAssociationId com.amazonaws.ec2#ElasticInferenceAcceleratorAssociation$ElasticInferenceAcceleratorAssociationId */ => {
let var_2780 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_inference_accelerator_association_id(var_2780);
}
,
s if s.matches("elasticInferenceAcceleratorAssociationState") /* ElasticInferenceAcceleratorAssociationState com.amazonaws.ec2#ElasticInferenceAcceleratorAssociation$ElasticInferenceAcceleratorAssociationState */ => {
let var_2781 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_elastic_inference_accelerator_association_state(var_2781);
}
,
s if s.matches("elasticInferenceAcceleratorAssociationTime") /* ElasticInferenceAcceleratorAssociationTime com.amazonaws.ec2#ElasticInferenceAcceleratorAssociation$ElasticInferenceAcceleratorAssociationTime */ => {
let var_2782 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_elastic_inference_accelerator_association_time(var_2782);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_network_interface(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceNetworkInterface, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceNetworkInterface::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#InstanceNetworkInterface$Association */ => {
let var_2783 =
Some(
crate::xml_deser::deser_structure_instance_network_interface_association(&mut tag)
?
)
;
builder = builder.set_association(var_2783);
}
,
s if s.matches("attachment") /* Attachment com.amazonaws.ec2#InstanceNetworkInterface$Attachment */ => {
let var_2784 =
Some(
crate::xml_deser::deser_structure_instance_network_interface_attachment(&mut tag)
?
)
;
builder = builder.set_attachment(var_2784);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#InstanceNetworkInterface$Description */ => {
let var_2785 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2785);
}
,
s if s.matches("groupSet") /* Groups com.amazonaws.ec2#InstanceNetworkInterface$Groups */ => {
let var_2786 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2786);
}
,
s if s.matches("ipv6AddressesSet") /* Ipv6Addresses com.amazonaws.ec2#InstanceNetworkInterface$Ipv6Addresses */ => {
let var_2787 =
Some(
crate::xml_deser::deser_list_instance_ipv6_address_list(&mut tag)
?
)
;
builder = builder.set_ipv6_addresses(var_2787);
}
,
s if s.matches("macAddress") /* MacAddress com.amazonaws.ec2#InstanceNetworkInterface$MacAddress */ => {
let var_2788 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_mac_address(var_2788);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#InstanceNetworkInterface$NetworkInterfaceId */ => {
let var_2789 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2789);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#InstanceNetworkInterface$OwnerId */ => {
let var_2790 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_owner_id(var_2790);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#InstanceNetworkInterface$PrivateDnsName */ => {
let var_2791 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2791);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#InstanceNetworkInterface$PrivateIpAddress */ => {
let var_2792 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2792);
}
,
s if s.matches("privateIpAddressesSet") /* PrivateIpAddresses com.amazonaws.ec2#InstanceNetworkInterface$PrivateIpAddresses */ => {
let var_2793 =
Some(
crate::xml_deser::deser_list_instance_private_ip_address_list(&mut tag)
?
)
;
builder = builder.set_private_ip_addresses(var_2793);
}
,
s if s.matches("sourceDestCheck") /* SourceDestCheck com.amazonaws.ec2#InstanceNetworkInterface$SourceDestCheck */ => {
let var_2794 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_source_dest_check(var_2794);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#InstanceNetworkInterface$Status */ => {
let var_2795 =
Some(
Result::<crate::model::NetworkInterfaceStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::NetworkInterfaceStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2795);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#InstanceNetworkInterface$SubnetId */ => {
let var_2796 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2796);
}
,
s if s.matches("vpcId") /* VpcId com.amazonaws.ec2#InstanceNetworkInterface$VpcId */ => {
let var_2797 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_id(var_2797);
}
,
s if s.matches("interfaceType") /* InterfaceType com.amazonaws.ec2#InstanceNetworkInterface$InterfaceType */ => {
let var_2798 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_interface_type(var_2798);
}
,
s if s.matches("ipv4PrefixSet") /* Ipv4Prefixes com.amazonaws.ec2#InstanceNetworkInterface$Ipv4Prefixes */ => {
let var_2799 =
Some(
crate::xml_deser::deser_list_instance_ipv4_prefix_list(&mut tag)
?
)
;
builder = builder.set_ipv4_prefixes(var_2799);
}
,
s if s.matches("ipv6PrefixSet") /* Ipv6Prefixes com.amazonaws.ec2#InstanceNetworkInterface$Ipv6Prefixes */ => {
let var_2800 =
Some(
crate::xml_deser::deser_list_instance_ipv6_prefix_list(&mut tag)
?
)
;
builder = builder.set_ipv6_prefixes(var_2800);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_license_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LicenseConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LicenseConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("licenseConfigurationArn") /* LicenseConfigurationArn com.amazonaws.ec2#LicenseConfiguration$LicenseConfigurationArn */ => {
let var_2801 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_license_configuration_arn(var_2801);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_acl_rule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisAclRule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisAclRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#AnalysisAclRule$Cidr */ => {
let var_2802 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_2802);
}
,
s if s.matches("egress") /* Egress com.amazonaws.ec2#AnalysisAclRule$Egress */ => {
let var_2803 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_egress(var_2803);
}
,
s if s.matches("portRange") /* PortRange com.amazonaws.ec2#AnalysisAclRule$PortRange */ => {
let var_2804 =
Some(
crate::xml_deser::deser_structure_port_range(&mut tag)
?
)
;
builder = builder.set_port_range(var_2804);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#AnalysisAclRule$Protocol */ => {
let var_2805 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_2805);
}
,
s if s.matches("ruleAction") /* RuleAction com.amazonaws.ec2#AnalysisAclRule$RuleAction */ => {
let var_2806 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_rule_action(var_2806);
}
,
s if s.matches("ruleNumber") /* RuleNumber com.amazonaws.ec2#AnalysisAclRule$RuleNumber */ => {
let var_2807 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_rule_number(var_2807);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_component(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisComponent, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisComponent::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("id") /* Id com.amazonaws.ec2#AnalysisComponent$Id */ => {
let var_2808 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_id(var_2808);
}
,
s if s.matches("arn") /* Arn com.amazonaws.ec2#AnalysisComponent$Arn */ => {
let var_2809 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_2809);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_packet_header(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisPacketHeader, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisPacketHeader::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationAddressSet") /* DestinationAddresses com.amazonaws.ec2#AnalysisPacketHeader$DestinationAddresses */ => {
let var_2810 =
Some(
crate::xml_deser::deser_list_ip_address_list(&mut tag)
?
)
;
builder = builder.set_destination_addresses(var_2810);
}
,
s if s.matches("destinationPortRangeSet") /* DestinationPortRanges com.amazonaws.ec2#AnalysisPacketHeader$DestinationPortRanges */ => {
let var_2811 =
Some(
crate::xml_deser::deser_list_port_range_list(&mut tag)
?
)
;
builder = builder.set_destination_port_ranges(var_2811);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#AnalysisPacketHeader$Protocol */ => {
let var_2812 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_2812);
}
,
s if s.matches("sourceAddressSet") /* SourceAddresses com.amazonaws.ec2#AnalysisPacketHeader$SourceAddresses */ => {
let var_2813 =
Some(
crate::xml_deser::deser_list_ip_address_list(&mut tag)
?
)
;
builder = builder.set_source_addresses(var_2813);
}
,
s if s.matches("sourcePortRangeSet") /* SourcePortRanges com.amazonaws.ec2#AnalysisPacketHeader$SourcePortRanges */ => {
let var_2814 =
Some(
crate::xml_deser::deser_list_port_range_list(&mut tag)
?
)
;
builder = builder.set_source_port_ranges(var_2814);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_route_table_route(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisRouteTableRoute, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisRouteTableRoute::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("destinationCidr") /* DestinationCidr com.amazonaws.ec2#AnalysisRouteTableRoute$DestinationCidr */ => {
let var_2815 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_cidr(var_2815);
}
,
s if s.matches("destinationPrefixListId") /* DestinationPrefixListId com.amazonaws.ec2#AnalysisRouteTableRoute$DestinationPrefixListId */ => {
let var_2816 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_destination_prefix_list_id(var_2816);
}
,
s if s.matches("egressOnlyInternetGatewayId") /* EgressOnlyInternetGatewayId com.amazonaws.ec2#AnalysisRouteTableRoute$EgressOnlyInternetGatewayId */ => {
let var_2817 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_egress_only_internet_gateway_id(var_2817);
}
,
s if s.matches("gatewayId") /* GatewayId com.amazonaws.ec2#AnalysisRouteTableRoute$GatewayId */ => {
let var_2818 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_gateway_id(var_2818);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#AnalysisRouteTableRoute$InstanceId */ => {
let var_2819 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_id(var_2819);
}
,
s if s.matches("natGatewayId") /* NatGatewayId com.amazonaws.ec2#AnalysisRouteTableRoute$NatGatewayId */ => {
let var_2820 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_nat_gateway_id(var_2820);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#AnalysisRouteTableRoute$NetworkInterfaceId */ => {
let var_2821 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2821);
}
,
s if s.matches("origin") /* Origin com.amazonaws.ec2#AnalysisRouteTableRoute$Origin */ => {
let var_2822 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_origin(var_2822);
}
,
s if s.matches("transitGatewayId") /* TransitGatewayId com.amazonaws.ec2#AnalysisRouteTableRoute$TransitGatewayId */ => {
let var_2823 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_transit_gateway_id(var_2823);
}
,
s if s.matches("vpcPeeringConnectionId") /* VpcPeeringConnectionId com.amazonaws.ec2#AnalysisRouteTableRoute$VpcPeeringConnectionId */ => {
let var_2824 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_vpc_peering_connection_id(var_2824);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_security_group_rule(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisSecurityGroupRule, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisSecurityGroupRule::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("cidr") /* Cidr com.amazonaws.ec2#AnalysisSecurityGroupRule$Cidr */ => {
let var_2825 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_cidr(var_2825);
}
,
s if s.matches("direction") /* Direction com.amazonaws.ec2#AnalysisSecurityGroupRule$Direction */ => {
let var_2826 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_direction(var_2826);
}
,
s if s.matches("securityGroupId") /* SecurityGroupId com.amazonaws.ec2#AnalysisSecurityGroupRule$SecurityGroupId */ => {
let var_2827 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_security_group_id(var_2827);
}
,
s if s.matches("portRange") /* PortRange com.amazonaws.ec2#AnalysisSecurityGroupRule$PortRange */ => {
let var_2828 =
Some(
crate::xml_deser::deser_structure_port_range(&mut tag)
?
)
;
builder = builder.set_port_range(var_2828);
}
,
s if s.matches("prefixListId") /* PrefixListId com.amazonaws.ec2#AnalysisSecurityGroupRule$PrefixListId */ => {
let var_2829 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_prefix_list_id(var_2829);
}
,
s if s.matches("protocol") /* Protocol com.amazonaws.ec2#AnalysisSecurityGroupRule$Protocol */ => {
let var_2830 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_protocol(var_2830);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_ip_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IpAddressList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_analysis_load_balancer_listener(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisLoadBalancerListener, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisLoadBalancerListener::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("loadBalancerPort") /* LoadBalancerPort com.amazonaws.ec2#AnalysisLoadBalancerListener$LoadBalancerPort */ => {
let var_2831 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_load_balancer_port(var_2831);
}
,
s if s.matches("instancePort") /* InstancePort com.amazonaws.ec2#AnalysisLoadBalancerListener$InstancePort */ => {
let var_2832 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_instance_port(var_2832);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_analysis_load_balancer_target(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::AnalysisLoadBalancerTarget, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::AnalysisLoadBalancerTarget::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("address") /* Address com.amazonaws.ec2#AnalysisLoadBalancerTarget$Address */ => {
let var_2833 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_address(var_2833);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#AnalysisLoadBalancerTarget$AvailabilityZone */ => {
let var_2834 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2834);
}
,
s if s.matches("instance") /* Instance com.amazonaws.ec2#AnalysisLoadBalancerTarget$Instance */ => {
let var_2835 =
Some(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
)
;
builder = builder.set_instance(var_2835);
}
,
s if s.matches("port") /* Port com.amazonaws.ec2#AnalysisLoadBalancerTarget$Port */ => {
let var_2836 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Port`)"))
}
?
)
;
builder = builder.set_port(var_2836);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_analysis_component_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::AnalysisComponent>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#AnalysisComponentList$member */ => {
out.push(
crate::xml_deser::deser_structure_analysis_component(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_port_range_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::PortRange>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PortRangeList$member */ => {
out.push(
crate::xml_deser::deser_structure_port_range(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_string_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#StringList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_placement_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PlacementResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PlacementResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupName") /* GroupName com.amazonaws.ec2#PlacementResponse$GroupName */ => {
let var_2837 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_group_name(var_2837);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_phase1_encryption_algorithms_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Phase1EncryptionAlgorithmsListValue>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase1EncryptionAlgorithmsList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase1_encryption_algorithms_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_phase2_encryption_algorithms_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Phase2EncryptionAlgorithmsListValue>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase2EncryptionAlgorithmsList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase2_encryption_algorithms_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_phase1_integrity_algorithms_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Phase1IntegrityAlgorithmsListValue>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase1IntegrityAlgorithmsList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase1_integrity_algorithms_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_phase2_integrity_algorithms_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<
std::vec::Vec<crate::model::Phase2IntegrityAlgorithmsListValue>,
smithy_xml::decode::XmlError,
> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase2IntegrityAlgorithmsList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase2_integrity_algorithms_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_phase1_dh_group_numbers_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Phase1DhGroupNumbersListValue>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase1DHGroupNumbersList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase1_dh_group_numbers_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_phase2_dh_group_numbers_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Phase2DhGroupNumbersListValue>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Phase2DHGroupNumbersList$member */ => {
out.push(
crate::xml_deser::deser_structure_phase2_dh_group_numbers_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ike_versions_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::IkeVersionsListValue>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IKEVersionsList$member */ => {
out.push(
crate::xml_deser::deser_structure_ike_versions_list_value(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_directory_service_authentication(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DirectoryServiceAuthentication, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DirectoryServiceAuthentication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("directoryId") /* DirectoryId com.amazonaws.ec2#DirectoryServiceAuthentication$DirectoryId */ => {
let var_2838 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_directory_id(var_2838);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_certificate_authentication(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::CertificateAuthentication, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::CertificateAuthentication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("clientRootCertificateChain") /* ClientRootCertificateChain com.amazonaws.ec2#CertificateAuthentication$ClientRootCertificateChain */ => {
let var_2839 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_client_root_certificate_chain(var_2839);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_federated_authentication(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FederatedAuthentication, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FederatedAuthentication::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("samlProviderArn") /* SamlProviderArn com.amazonaws.ec2#FederatedAuthentication$SamlProviderArn */ => {
let var_2840 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_saml_provider_arn(var_2840);
}
,
s if s.matches("selfServiceSamlProviderArn") /* SelfServiceSamlProviderArn com.amazonaws.ec2#FederatedAuthentication$SelfServiceSamlProviderArn */ => {
let var_2841 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_self_service_saml_provider_arn(var_2841);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_fleet_launch_template_overrides_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::FleetLaunchTemplateOverrides>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#FleetLaunchTemplateOverridesList$member */ => {
out.push(
crate::xml_deser::deser_structure_fleet_launch_template_overrides(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_fleet_spot_capacity_rebalance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FleetSpotCapacityRebalance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FleetSpotCapacityRebalance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("replacementStrategy") /* ReplacementStrategy com.amazonaws.ec2#FleetSpotCapacityRebalance$ReplacementStrategy */ => {
let var_2842 =
Some(
Result::<crate::model::FleetReplacementStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::FleetReplacementStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_replacement_strategy(var_2842);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_capacity(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceCapacity, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceCapacity::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availableCapacity") /* AvailableCapacity com.amazonaws.ec2#InstanceCapacity$AvailableCapacity */ => {
let var_2843 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_available_capacity(var_2843);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#InstanceCapacity$InstanceType */ => {
let var_2844 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_instance_type(var_2844);
}
,
s if s.matches("totalCapacity") /* TotalCapacity com.amazonaws.ec2#InstanceCapacity$TotalCapacity */ => {
let var_2845 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_total_capacity(var_2845);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_status_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStatusDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceStatusDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("impairedSince") /* ImpairedSince com.amazonaws.ec2#InstanceStatusDetails$ImpairedSince */ => {
let var_2846 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_impaired_since(var_2846);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#InstanceStatusDetails$Name */ => {
let var_2847 =
Some(
Result::<crate::model::StatusName, smithy_xml::decode::XmlError>::Ok(
crate::model::StatusName::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_name(var_2847);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#InstanceStatusDetails$Status */ => {
let var_2848 =
Some(
Result::<crate::model::StatusType, smithy_xml::decode::XmlError>::Ok(
crate::model::StatusType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2848);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disk_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DiskInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DiskInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInGB") /* SizeInGB com.amazonaws.ec2#DiskInfo$SizeInGB */ => {
let var_2849 =
Some(
{
<i64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (long: `com.amazonaws.ec2#DiskSize`)"))
}
?
)
;
builder = builder.set_size_in_gb(var_2849);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#DiskInfo$Count */ => {
let var_2850 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#DiskCount`)"))
}
?
)
;
builder = builder.set_count(var_2850);
}
,
s if s.matches("type") /* Type com.amazonaws.ec2#DiskInfo$Type */ => {
let var_2851 =
Some(
Result::<crate::model::DiskType, smithy_xml::decode::XmlError>::Ok(
crate::model::DiskType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_type(var_2851);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_network_card_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::NetworkCardInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::NetworkCardInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#NetworkCardInfo$NetworkCardIndex */ => {
let var_2852 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#NetworkCardIndex`)"))
}
?
)
;
builder = builder.set_network_card_index(var_2852);
}
,
s if s.matches("networkPerformance") /* NetworkPerformance com.amazonaws.ec2#NetworkCardInfo$NetworkPerformance */ => {
let var_2853 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_performance(var_2853);
}
,
s if s.matches("maximumNetworkInterfaces") /* MaximumNetworkInterfaces com.amazonaws.ec2#NetworkCardInfo$MaximumNetworkInterfaces */ => {
let var_2854 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#MaxNetworkInterfaces`)"))
}
?
)
;
builder = builder.set_maximum_network_interfaces(var_2854);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_gpu_device_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#GpuDeviceInfo$Name */ => {
let var_2855 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2855);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#GpuDeviceInfo$Manufacturer */ => {
let var_2856 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_manufacturer(var_2856);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#GpuDeviceInfo$Count */ => {
let var_2857 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#GpuDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_2857);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#GpuDeviceInfo$MemoryInfo */ => {
let var_2858 =
Some(
crate::xml_deser::deser_structure_gpu_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_2858);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fpga_device_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaDeviceInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#FpgaDeviceInfo$Name */ => {
let var_2859 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2859);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#FpgaDeviceInfo$Manufacturer */ => {
let var_2860 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_manufacturer(var_2860);
}
,
s if s.matches("count") /* Count com.amazonaws.ec2#FpgaDeviceInfo$Count */ => {
let var_2861 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#FpgaDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_2861);
}
,
s if s.matches("memoryInfo") /* MemoryInfo com.amazonaws.ec2#FpgaDeviceInfo$MemoryInfo */ => {
let var_2862 =
Some(
crate::xml_deser::deser_structure_fpga_device_memory_info(&mut tag)
?
)
;
builder = builder.set_memory_info(var_2862);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_inference_device_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InferenceDeviceInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InferenceDeviceInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("count") /* Count com.amazonaws.ec2#InferenceDeviceInfo$Count */ => {
let var_2863 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#InferenceDeviceCount`)"))
}
?
)
;
builder = builder.set_count(var_2863);
}
,
s if s.matches("name") /* Name com.amazonaws.ec2#InferenceDeviceInfo$Name */ => {
let var_2864 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2864);
}
,
s if s.matches("manufacturer") /* Manufacturer com.amazonaws.ec2#InferenceDeviceInfo$Manufacturer */ => {
let var_2865 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_manufacturer(var_2865);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_reserved_instances_configuration(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ReservedInstancesConfiguration, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ReservedInstancesConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#ReservedInstancesConfiguration$AvailabilityZone */ => {
let var_2866 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2866);
}
,
s if s.matches("instanceCount") /* InstanceCount com.amazonaws.ec2#ReservedInstancesConfiguration$InstanceCount */ => {
let var_2867 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_instance_count(var_2867);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#ReservedInstancesConfiguration$InstanceType */ => {
let var_2868 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2868);
}
,
s if s.matches("platform") /* Platform com.amazonaws.ec2#ReservedInstancesConfiguration$Platform */ => {
let var_2869 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_platform(var_2869);
}
,
s if s.matches("scope") /* Scope com.amazonaws.ec2#ReservedInstancesConfiguration$Scope */ => {
let var_2870 =
Some(
Result::<crate::model::Scope, smithy_xml::decode::XmlError>::Ok(
crate::model::Scope::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_scope(var_2870);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_capacity_rebalance(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotCapacityRebalance, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotCapacityRebalance::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("replacementStrategy") /* ReplacementStrategy com.amazonaws.ec2#SpotCapacityRebalance$ReplacementStrategy */ => {
let var_2871 =
Some(
Result::<crate::model::ReplacementStrategy, smithy_xml::decode::XmlError>::Ok(
crate::model::ReplacementStrategy::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_replacement_strategy(var_2871);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_fleet_launch_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetLaunchSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetLaunchSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("groupSet") /* SecurityGroups com.amazonaws.ec2#SpotFleetLaunchSpecification$SecurityGroups */ => {
let var_2872 =
Some(
crate::xml_deser::deser_list_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_security_groups(var_2872);
}
,
s if s.matches("addressingType") /* AddressingType com.amazonaws.ec2#SpotFleetLaunchSpecification$AddressingType */ => {
let var_2873 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_addressing_type(var_2873);
}
,
s if s.matches("blockDeviceMapping") /* BlockDeviceMappings com.amazonaws.ec2#SpotFleetLaunchSpecification$BlockDeviceMappings */ => {
let var_2874 =
Some(
crate::xml_deser::deser_list_block_device_mapping_list(&mut tag)
?
)
;
builder = builder.set_block_device_mappings(var_2874);
}
,
s if s.matches("ebsOptimized") /* EbsOptimized com.amazonaws.ec2#SpotFleetLaunchSpecification$EbsOptimized */ => {
let var_2875 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_ebs_optimized(var_2875);
}
,
s if s.matches("iamInstanceProfile") /* IamInstanceProfile com.amazonaws.ec2#SpotFleetLaunchSpecification$IamInstanceProfile */ => {
let var_2876 =
Some(
crate::xml_deser::deser_structure_iam_instance_profile_specification(&mut tag)
?
)
;
builder = builder.set_iam_instance_profile(var_2876);
}
,
s if s.matches("imageId") /* ImageId com.amazonaws.ec2#SpotFleetLaunchSpecification$ImageId */ => {
let var_2877 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_image_id(var_2877);
}
,
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#SpotFleetLaunchSpecification$InstanceType */ => {
let var_2878 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2878);
}
,
s if s.matches("kernelId") /* KernelId com.amazonaws.ec2#SpotFleetLaunchSpecification$KernelId */ => {
let var_2879 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_kernel_id(var_2879);
}
,
s if s.matches("keyName") /* KeyName com.amazonaws.ec2#SpotFleetLaunchSpecification$KeyName */ => {
let var_2880 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_key_name(var_2880);
}
,
s if s.matches("monitoring") /* Monitoring com.amazonaws.ec2#SpotFleetLaunchSpecification$Monitoring */ => {
let var_2881 =
Some(
crate::xml_deser::deser_structure_spot_fleet_monitoring(&mut tag)
?
)
;
builder = builder.set_monitoring(var_2881);
}
,
s if s.matches("networkInterfaceSet") /* NetworkInterfaces com.amazonaws.ec2#SpotFleetLaunchSpecification$NetworkInterfaces */ => {
let var_2882 =
Some(
crate::xml_deser::deser_list_instance_network_interface_specification_list(&mut tag)
?
)
;
builder = builder.set_network_interfaces(var_2882);
}
,
s if s.matches("placement") /* Placement com.amazonaws.ec2#SpotFleetLaunchSpecification$Placement */ => {
let var_2883 =
Some(
crate::xml_deser::deser_structure_spot_placement(&mut tag)
?
)
;
builder = builder.set_placement(var_2883);
}
,
s if s.matches("ramdiskId") /* RamdiskId com.amazonaws.ec2#SpotFleetLaunchSpecification$RamdiskId */ => {
let var_2884 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ramdisk_id(var_2884);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#SpotFleetLaunchSpecification$SpotPrice */ => {
let var_2885 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_2885);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#SpotFleetLaunchSpecification$SubnetId */ => {
let var_2886 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2886);
}
,
s if s.matches("userData") /* UserData com.amazonaws.ec2#SpotFleetLaunchSpecification$UserData */ => {
let var_2887 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_user_data(var_2887);
}
,
s if s.matches("weightedCapacity") /* WeightedCapacity com.amazonaws.ec2#SpotFleetLaunchSpecification$WeightedCapacity */ => {
let var_2888 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_weighted_capacity(var_2888);
}
,
s if s.matches("tagSpecificationSet") /* TagSpecifications com.amazonaws.ec2#SpotFleetLaunchSpecification$TagSpecifications */ => {
let var_2889 =
Some(
crate::xml_deser::deser_list_spot_fleet_tag_specification_list(&mut tag)
?
)
;
builder = builder.set_tag_specifications(var_2889);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("launchTemplateSpecification") /* LaunchTemplateSpecification com.amazonaws.ec2#LaunchTemplateConfig$LaunchTemplateSpecification */ => {
let var_2890 =
Some(
crate::xml_deser::deser_structure_fleet_launch_template_specification(&mut tag)
?
)
;
builder = builder.set_launch_template_specification(var_2890);
}
,
s if s.matches("overrides") /* Overrides com.amazonaws.ec2#LaunchTemplateConfig$Overrides */ => {
let var_2891 =
Some(
crate::xml_deser::deser_list_launch_template_overrides_list(&mut tag)
?
)
;
builder = builder.set_overrides(var_2891);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_classic_load_balancers_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClassicLoadBalancersConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClassicLoadBalancersConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("classicLoadBalancers") /* ClassicLoadBalancers com.amazonaws.ec2#ClassicLoadBalancersConfig$ClassicLoadBalancers */ => {
let var_2892 =
Some(
crate::xml_deser::deser_list_classic_load_balancers(&mut tag)
?
)
;
builder = builder.set_classic_load_balancers(var_2892);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_target_groups_config(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetGroupsConfig, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetGroupsConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("targetGroups") /* TargetGroups com.amazonaws.ec2#TargetGroupsConfig$TargetGroups */ => {
let var_2893 =
Some(
crate::xml_deser::deser_list_target_groups(&mut tag)
?
)
;
builder = builder.set_target_groups(var_2893);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_tag_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TagSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TagSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#TagSpecification$ResourceType */ => {
let var_2894 =
Some(
Result::<crate::model::ResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::ResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2894);
}
,
s if s.matches("Tag") /* Tags com.amazonaws.ec2#TagSpecification$Tags */ => {
let var_2895 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2895);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_network_interface_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceNetworkInterfaceSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceNetworkInterfaceSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("associatePublicIpAddress") /* AssociatePublicIpAddress com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$AssociatePublicIpAddress */ => {
let var_2896 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_associate_public_ip_address(var_2896);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$DeleteOnTermination */ => {
let var_2897 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2897);
}
,
s if s.matches("description") /* Description com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Description */ => {
let var_2898 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_2898);
}
,
s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$DeviceIndex */ => {
let var_2899 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_device_index(var_2899);
}
,
s if s.matches("SecurityGroupId") /* Groups com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Groups */ => {
let var_2900 =
Some(
crate::xml_deser::deser_list_security_group_id_string_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2900);
}
,
s if s.matches("ipv6AddressCount") /* Ipv6AddressCount com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv6AddressCount */ => {
let var_2901 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv6_address_count(var_2901);
}
,
s if s.matches("ipv6AddressesSet") /* Ipv6Addresses com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv6Addresses */ => {
let var_2902 =
Some(
crate::xml_deser::deser_list_instance_ipv6_address_list(&mut tag)
?
)
;
builder = builder.set_ipv6_addresses(var_2902);
}
,
s if s.matches("networkInterfaceId") /* NetworkInterfaceId com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$NetworkInterfaceId */ => {
let var_2903 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_network_interface_id(var_2903);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$PrivateIpAddress */ => {
let var_2904 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2904);
}
,
s if s.matches("privateIpAddressesSet") /* PrivateIpAddresses com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$PrivateIpAddresses */ => {
let var_2905 =
Some(
crate::xml_deser::deser_list_private_ip_address_specification_list(&mut tag)
?
)
;
builder = builder.set_private_ip_addresses(var_2905);
}
,
s if s.matches("secondaryPrivateIpAddressCount") /* SecondaryPrivateIpAddressCount com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$SecondaryPrivateIpAddressCount */ => {
let var_2906 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_secondary_private_ip_address_count(var_2906);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$SubnetId */ => {
let var_2907 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2907);
}
,
s if s.matches("AssociateCarrierIpAddress") /* AssociateCarrierIpAddress com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$AssociateCarrierIpAddress */ => {
let var_2908 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_associate_carrier_ip_address(var_2908);
}
,
s if s.matches("InterfaceType") /* InterfaceType com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$InterfaceType */ => {
let var_2909 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_interface_type(var_2909);
}
,
s if s.matches("NetworkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$NetworkCardIndex */ => {
let var_2910 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_network_card_index(var_2910);
}
,
s if s.matches("Ipv4Prefix") /* Ipv4Prefixes com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv4Prefixes */ => {
let var_2911 =
Some(
crate::xml_deser::deser_list_ipv4_prefix_list(&mut tag)
?
)
;
builder = builder.set_ipv4_prefixes(var_2911);
}
,
s if s.matches("Ipv4PrefixCount") /* Ipv4PrefixCount com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv4PrefixCount */ => {
let var_2912 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv4_prefix_count(var_2912);
}
,
s if s.matches("Ipv6Prefix") /* Ipv6Prefixes com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv6Prefixes */ => {
let var_2913 =
Some(
crate::xml_deser::deser_list_ipv6_prefix_list(&mut tag)
?
)
;
builder = builder.set_ipv6_prefixes(var_2913);
}
,
s if s.matches("Ipv6PrefixCount") /* Ipv6PrefixCount com.amazonaws.ec2#InstanceNetworkInterfaceSpecification$Ipv6PrefixCount */ => {
let var_2914 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_ipv6_prefix_count(var_2914);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_ip_ranges(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#IpRanges$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_prefix_list_id_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#PrefixListIdSet$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_user_id_group_pair_set(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::UserIdGroupPair>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#UserIdGroupPairSet$member */ => {
out.push(
crate::xml_deser::deser_structure_user_id_group_pair(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_volume_status_details(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::VolumeStatusDetails, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::VolumeStatusDetails::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#VolumeStatusDetails$Name */ => {
let var_2915 =
Some(
Result::<crate::model::VolumeStatusName, smithy_xml::decode::XmlError>::Ok(
crate::model::VolumeStatusName::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_name(var_2915);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#VolumeStatusDetails$Status */ => {
let var_2916 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status(var_2916);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_disable_fast_snapshot_restore_state_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DisableFastSnapshotRestoreStateError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::DisableFastSnapshotRestoreStateError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#DisableFastSnapshotRestoreStateError$Code */ => {
let var_2917 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2917);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#DisableFastSnapshotRestoreStateError$Message */ => {
let var_2918 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2918);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_enable_fast_snapshot_restore_state_error(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::EnableFastSnapshotRestoreStateError, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::EnableFastSnapshotRestoreStateError::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("code") /* Code com.amazonaws.ec2#EnableFastSnapshotRestoreStateError$Code */ => {
let var_2919 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_code(var_2919);
}
,
s if s.matches("message") /* Message com.amazonaws.ec2#EnableFastSnapshotRestoreStateError$Message */ => {
let var_2920 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message(var_2920);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_ipv6_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceIpv6Address, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceIpv6Address::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Address") /* Ipv6Address com.amazonaws.ec2#InstanceIpv6Address$Ipv6Address */ => {
let var_2921 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_address(var_2921);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_private_ip_address_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::PrivateIpAddressSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::PrivateIpAddressSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("primary") /* Primary com.amazonaws.ec2#PrivateIpAddressSpecification$Primary */ => {
let var_2922 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_primary(var_2922);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#PrivateIpAddressSpecification$PrivateIpAddress */ => {
let var_2923 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2923);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv4_prefix_specification_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv4PrefixSpecificationResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv4PrefixSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv4Prefix") /* Ipv4Prefix com.amazonaws.ec2#Ipv4PrefixSpecificationResponse$Ipv4Prefix */ => {
let var_2924 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv4_prefix(var_2924);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_prefix_specification_response(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6PrefixSpecificationResponse, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6PrefixSpecificationResponse::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Prefix") /* Ipv6Prefix com.amazonaws.ec2#Ipv6PrefixSpecificationResponse$Ipv6Prefix */ => {
let var_2925 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_prefix(var_2925);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_network_interface_association(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceNetworkInterfaceAssociation, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceNetworkInterfaceAssociation::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("carrierIp") /* CarrierIp com.amazonaws.ec2#InstanceNetworkInterfaceAssociation$CarrierIp */ => {
let var_2926 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_carrier_ip(var_2926);
}
,
s if s.matches("ipOwnerId") /* IpOwnerId com.amazonaws.ec2#InstanceNetworkInterfaceAssociation$IpOwnerId */ => {
let var_2927 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ip_owner_id(var_2927);
}
,
s if s.matches("publicDnsName") /* PublicDnsName com.amazonaws.ec2#InstanceNetworkInterfaceAssociation$PublicDnsName */ => {
let var_2928 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_dns_name(var_2928);
}
,
s if s.matches("publicIp") /* PublicIp com.amazonaws.ec2#InstanceNetworkInterfaceAssociation$PublicIp */ => {
let var_2929 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_public_ip(var_2929);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_network_interface_attachment(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceNetworkInterfaceAttachment, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceNetworkInterfaceAttachment::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("attachTime") /* AttachTime com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$AttachTime */ => {
let var_2930 =
Some(
smithy_types::Instant::from_str(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
, smithy_types::instant::Format::DateTime
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (timestamp: `com.amazonaws.ec2#DateTime`)"))
?
)
;
builder = builder.set_attach_time(var_2930);
}
,
s if s.matches("attachmentId") /* AttachmentId com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$AttachmentId */ => {
let var_2931 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_attachment_id(var_2931);
}
,
s if s.matches("deleteOnTermination") /* DeleteOnTermination com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$DeleteOnTermination */ => {
let var_2932 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_delete_on_termination(var_2932);
}
,
s if s.matches("deviceIndex") /* DeviceIndex com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$DeviceIndex */ => {
let var_2933 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_device_index(var_2933);
}
,
s if s.matches("status") /* Status com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$Status */ => {
let var_2934 =
Some(
Result::<crate::model::AttachmentStatus, smithy_xml::decode::XmlError>::Ok(
crate::model::AttachmentStatus::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_status(var_2934);
}
,
s if s.matches("networkCardIndex") /* NetworkCardIndex com.amazonaws.ec2#InstanceNetworkInterfaceAttachment$NetworkCardIndex */ => {
let var_2935 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_network_card_index(var_2935);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_instance_private_ip_address_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstancePrivateIpAddress>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstancePrivateIpAddressList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_private_ip_address(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_ipv4_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceIpv4Prefix>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIpv4PrefixList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_ipv4_prefix(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_instance_ipv6_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::InstanceIpv6Prefix>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#InstanceIpv6PrefixList$member */ => {
out.push(
crate::xml_deser::deser_structure_instance_ipv6_prefix(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_phase1_encryption_algorithms_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase1EncryptionAlgorithmsListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase1EncryptionAlgorithmsListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase1EncryptionAlgorithmsListValue$Value */ => {
let var_2936 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2936);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_phase2_encryption_algorithms_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase2EncryptionAlgorithmsListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase2EncryptionAlgorithmsListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase2EncryptionAlgorithmsListValue$Value */ => {
let var_2937 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2937);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_phase1_integrity_algorithms_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase1IntegrityAlgorithmsListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase1IntegrityAlgorithmsListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase1IntegrityAlgorithmsListValue$Value */ => {
let var_2938 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2938);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_phase2_integrity_algorithms_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase2IntegrityAlgorithmsListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase2IntegrityAlgorithmsListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase2IntegrityAlgorithmsListValue$Value */ => {
let var_2939 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2939);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_phase1_dh_group_numbers_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase1DhGroupNumbersListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase1DhGroupNumbersListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase1DHGroupNumbersListValue$Value */ => {
let var_2940 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_value(var_2940);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_phase2_dh_group_numbers_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Phase2DhGroupNumbersListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Phase2DhGroupNumbersListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#Phase2DHGroupNumbersListValue$Value */ => {
let var_2941 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#Integer`)"))
}
?
)
;
builder = builder.set_value(var_2941);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ike_versions_list_value(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::IkeVersionsListValue, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::IkeVersionsListValue::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("value") /* Value com.amazonaws.ec2#IKEVersionsListValue$Value */ => {
let var_2942 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_value(var_2942);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_gpu_device_memory_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::GpuDeviceMemoryInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::GpuDeviceMemoryInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInMiB") /* SizeInMiB com.amazonaws.ec2#GpuDeviceMemoryInfo$SizeInMiB */ => {
let var_2943 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#GpuDeviceMemorySize`)"))
}
?
)
;
builder = builder.set_size_in_mi_b(var_2943);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_fpga_device_memory_info(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::FpgaDeviceMemoryInfo, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::FpgaDeviceMemoryInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("sizeInMiB") /* SizeInMiB com.amazonaws.ec2#FpgaDeviceMemoryInfo$SizeInMiB */ => {
let var_2944 =
Some(
{
<i32 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (integer: `com.amazonaws.ec2#FpgaDeviceMemorySize`)"))
}
?
)
;
builder = builder.set_size_in_mi_b(var_2944);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_fleet_monitoring(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetMonitoring, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetMonitoring::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("enabled") /* Enabled com.amazonaws.ec2#SpotFleetMonitoring$Enabled */ => {
let var_2945 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_enabled(var_2945);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_list_spot_fleet_tag_specification_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::SpotFleetTagSpecification>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#SpotFleetTagSpecificationList$member */ => {
out.push(
crate::xml_deser::deser_structure_spot_fleet_tag_specification(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_launch_template_overrides_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::LaunchTemplateOverrides>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#LaunchTemplateOverridesList$member */ => {
out.push(
crate::xml_deser::deser_structure_launch_template_overrides(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_classic_load_balancers(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::ClassicLoadBalancer>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#ClassicLoadBalancers$member */ => {
out.push(
crate::xml_deser::deser_structure_classic_load_balancer(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_target_groups(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::TargetGroup>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#TargetGroups$member */ => {
out.push(
crate::xml_deser::deser_structure_target_group(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_security_group_id_string_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<std::string::String>, smithy_xml::decode::XmlError> {
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("SecurityGroupId") /* member com.amazonaws.ec2#SecurityGroupIdStringList$member */ => {
out.push(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv4_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv4PrefixSpecificationRequest>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv4PrefixList$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv4_prefix_specification_request(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_list_ipv6_prefix_list(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<std::vec::Vec<crate::model::Ipv6PrefixSpecificationRequest>, smithy_xml::decode::XmlError>
{
let mut out = std::vec::Vec::new();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("item") /* member com.amazonaws.ec2#Ipv6PrefixList$member */ => {
out.push(
crate::xml_deser::deser_structure_ipv6_prefix_specification_request(&mut tag)
?
);
}
,
_ => {}
}
}
Ok(out)
}
pub fn deser_structure_instance_private_ip_address(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstancePrivateIpAddress, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstancePrivateIpAddress::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("association") /* Association com.amazonaws.ec2#InstancePrivateIpAddress$Association */ => {
let var_2946 =
Some(
crate::xml_deser::deser_structure_instance_network_interface_association(&mut tag)
?
)
;
builder = builder.set_association(var_2946);
}
,
s if s.matches("primary") /* Primary com.amazonaws.ec2#InstancePrivateIpAddress$Primary */ => {
let var_2947 =
Some(
{
<bool as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (boolean: `com.amazonaws.ec2#Boolean`)"))
}
?
)
;
builder = builder.set_primary(var_2947);
}
,
s if s.matches("privateDnsName") /* PrivateDnsName com.amazonaws.ec2#InstancePrivateIpAddress$PrivateDnsName */ => {
let var_2948 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_dns_name(var_2948);
}
,
s if s.matches("privateIpAddress") /* PrivateIpAddress com.amazonaws.ec2#InstancePrivateIpAddress$PrivateIpAddress */ => {
let var_2949 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_private_ip_address(var_2949);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_ipv4_prefix(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceIpv4Prefix, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceIpv4Prefix::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv4Prefix") /* Ipv4Prefix com.amazonaws.ec2#InstanceIpv4Prefix$Ipv4Prefix */ => {
let var_2950 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv4_prefix(var_2950);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_instance_ipv6_prefix(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceIpv6Prefix, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::InstanceIpv6Prefix::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ipv6Prefix") /* Ipv6Prefix com.amazonaws.ec2#InstanceIpv6Prefix$Ipv6Prefix */ => {
let var_2951 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_prefix(var_2951);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_spot_fleet_tag_specification(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::SpotFleetTagSpecification, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::SpotFleetTagSpecification::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("resourceType") /* ResourceType com.amazonaws.ec2#SpotFleetTagSpecification$ResourceType */ => {
let var_2952 =
Some(
Result::<crate::model::ResourceType, smithy_xml::decode::XmlError>::Ok(
crate::model::ResourceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_resource_type(var_2952);
}
,
s if s.matches("tag") /* Tags com.amazonaws.ec2#SpotFleetTagSpecification$Tags */ => {
let var_2953 =
Some(
crate::xml_deser::deser_list_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_2953);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_launch_template_overrides(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::LaunchTemplateOverrides, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::LaunchTemplateOverrides::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("instanceType") /* InstanceType com.amazonaws.ec2#LaunchTemplateOverrides$InstanceType */ => {
let var_2954 =
Some(
Result::<crate::model::InstanceType, smithy_xml::decode::XmlError>::Ok(
crate::model::InstanceType::from(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2954);
}
,
s if s.matches("spotPrice") /* SpotPrice com.amazonaws.ec2#LaunchTemplateOverrides$SpotPrice */ => {
let var_2955 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_spot_price(var_2955);
}
,
s if s.matches("subnetId") /* SubnetId com.amazonaws.ec2#LaunchTemplateOverrides$SubnetId */ => {
let var_2956 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_subnet_id(var_2956);
}
,
s if s.matches("availabilityZone") /* AvailabilityZone com.amazonaws.ec2#LaunchTemplateOverrides$AvailabilityZone */ => {
let var_2957 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_availability_zone(var_2957);
}
,
s if s.matches("weightedCapacity") /* WeightedCapacity com.amazonaws.ec2#LaunchTemplateOverrides$WeightedCapacity */ => {
let var_2958 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_weighted_capacity(var_2958);
}
,
s if s.matches("priority") /* Priority com.amazonaws.ec2#LaunchTemplateOverrides$Priority */ => {
let var_2959 =
Some(
{
<f64 as smithy_types::primitive::Parse>::parse_smithy_primitive(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|smithy_xml::decode::XmlError::custom("expected (double: `com.amazonaws.ec2#Double`)"))
}
?
)
;
builder = builder.set_priority(var_2959);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_classic_load_balancer(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ClassicLoadBalancer, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::ClassicLoadBalancer::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("name") /* Name com.amazonaws.ec2#ClassicLoadBalancer$Name */ => {
let var_2960 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_name(var_2960);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_target_group(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::TargetGroup, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::TargetGroup::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("arn") /* Arn com.amazonaws.ec2#TargetGroup$Arn */ => {
let var_2961 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_arn(var_2961);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv4_prefix_specification_request(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv4PrefixSpecificationRequest, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv4PrefixSpecificationRequest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Ipv4Prefix") /* Ipv4Prefix com.amazonaws.ec2#Ipv4PrefixSpecificationRequest$Ipv4Prefix */ => {
let var_2962 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv4_prefix(var_2962);
}
,
_ => {}
}
}
Ok(builder.build())
}
pub fn deser_structure_ipv6_prefix_specification_request(
decoder: &mut smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Ipv6PrefixSpecificationRequest, smithy_xml::decode::XmlError> {
#[allow(unused_mut)]
let mut builder = crate::model::Ipv6PrefixSpecificationRequest::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("Ipv6Prefix") /* Ipv6Prefix com.amazonaws.ec2#Ipv6PrefixSpecificationRequest$Ipv6Prefix */ => {
let var_2963 =
Some(
Result::<std::string::String, smithy_xml::decode::XmlError>::Ok(
smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_ipv6_prefix(var_2963);
}
,
_ => {}
}
}
Ok(builder.build())
}
|
use crate::desktop::{Desktop, DesktopMode};
pub struct Monitor {
pub name: String,
pub alias: Option<String>,
desktops: Vec<Desktop>,
}
impl Monitor {
pub fn new(name: String) -> Self {
let mut monitor = Self {
name,
alias: None,
desktops: Vec::new(),
};
monitor.add_desktop(DesktopMode::Tile);
monitor
}
/// Add a new desktop.
pub fn add_desktop(&mut self, mode: DesktopMode) {
self.desktops.push(Desktop::new(mode));
}
/// Alias a monitor.
pub fn set_alias(&mut self, alias: &str) {
self.alias = Some(alias.to_string());
}
}
/// Represents all monitors managed by the window manager.
pub struct Monitors(Vec<Monitor>);
impl Monitors {
/// Create a list of empty monitors.
pub fn new() -> Self {
Self(Vec::new())
}
/// Add a new monitor.
pub fn add_monitor(&mut self, monitor: Monitor) {
self.0.push(monitor);
}
/// Find a monitor by name or alias.
pub fn find_by_name(&mut self, name: &str) -> Option<&mut Monitor> {
for monitor in self.0.iter_mut() {
if monitor.name == name
|| (monitor.alias.is_some() && monitor.alias.as_ref().unwrap() == name)
{
return Some(monitor);
}
}
None
}
}
#[cfg(test)]
mod test {
use crate::monitors::{Monitor, Monitors};
use std::borrow::BorrowMut;
#[test]
fn a_name_is_correctly_set_when_adding_a_monitor() {
let mut monitors = Monitors::new();
monitors.add_monitor(Monitor::new("test".to_string()));
assert_eq!("test".to_string(), monitors.0[0].name);
assert_eq!(1, monitors.0.len());
}
#[test]
fn a_monitor_can_be_find_by_name() {
let mut monitors = Monitors::new();
monitors.add_monitor(Monitor::new("HDMI-0".to_string()));
let monitor = monitors.find_by_name("HDMI-0");
assert_eq!(true, monitor.is_some());
assert_eq!("HDMI-0".to_string(), monitor.unwrap().name);
assert_eq!(1, monitors.0.len());
}
#[test]
fn a_monitor_can_be_aliased() {
let mut monitors = Monitors::new();
monitors.add_monitor(Monitor::new("HDMI-0".to_string()));
let monitor = monitors.find_by_name("HDMI-0").unwrap();
monitor.set_alias("left");
assert_eq!(true, monitor.alias.is_some());
assert_eq!("left", monitor.alias.as_ref().unwrap());
assert_eq!(1, monitors.0.len());
}
}
|
use actix_web::{web, App, HttpResponse, HttpServer, Responder};
use serde::{Serialize, Deserialize};
static NACOS_SERVER: &str = "http://127.0.0.1:8848/nacos";
static PROVIDER_NAME: &str = "rust-microservice";
static PROVIDER_HOST: &str = "127.0.0.1";
static PROVIDER_PORT: i32 = 8080;
mod nacos;
#[derive(Serialize, Deserialize)]
struct Message {
msg: String,
code: i32,
}
async fn index() -> impl Responder {
HttpResponse::Ok().body("this is a rust microservice demo")
}
async fn plain_text_resp() -> impl Responder {
HttpResponse::Ok().body("from /foo")
}
async fn json_resp() -> impl Responder {
let p = Message {
msg: "from /bar".to_string(),
code: 0,
};
HttpResponse::Ok().json(p)
}
#[actix_rt::main]
async fn main() {
println!("listening at http://localhost:8080");
nacos::register_service();
HttpServer::new(|| {
App::new()
.route("/", web::get().to(index))
.route("/foo", web::get().to(plain_text_resp))
.route("/bar",web::get().to(json_resp))
}).bind("127.0.0.1:8080")
.unwrap()
.run();
nacos::ping_schedule();
} |
#![allow(dead_code)]
#![allow(unused_variables)]
use is_executable::IsExecutable;
use std::env::var_os;
use std::path::Path;
pub struct WinowManager {
name: String,
command: String,
commment: String,
exists: bool,
}
pub type WinowManagerList = Vec<WinowManager>;
pub fn get_wm_list(available: Option<bool>) -> Option<(WinowManagerList, ())> {
None
}
pub fn find_program(name: &str) -> bool {
let abs_path = format!("/usr/bin/{}", name);
let path = Path::new(&abs_path);
if path.is_executable() {
true
} else if let Some(val) = var_os("PATH") {
let paths = val.to_str().unwrap().split(':');
for p in paths {
let file = format!("{}/{}", p, name);
if Path::new(&file).is_executable() {
return true;
}
}
false
} else {
false
}
}
|
use std::{path::PathBuf, str::FromStr};
use anyhow::Result;
use serde_derive::Deserialize;
use sqlx::{Connection, ConnectOptions};
use sqlx::sqlite::SqliteConnectOptions;
use structopt::StructOpt;
use tokio::{self, fs::File, io::AsyncReadExt};
#[derive(Debug, StructOpt)]
#[structopt(name = "list_servants")]
struct Options {
#[structopt(short, long, default_value = "sqlite:database.sqlite3")]
url: String,
#[structopt(parse(from_os_str))]
input: PathBuf,
}
#[derive(Deserialize)]
struct Config {
servants: Vec<Servant>
}
#[derive(Debug, Deserialize)]
struct Servant {
name: String,
class_name: String,
}
async fn read_config(options: &Options) -> Result<Vec<Servant>> {
let mut file = File::open(&options.input).await?;
let mut source = String::new();
file.read_to_string(&mut source).await?;
let config: Config = toml::from_str(&source)?;
Ok(config.servants)
}
#[tokio::main]
async fn main() -> Result<()> {
let options = Options::from_args();
let servants = read_config(&options).await?;
let mut connection = SqliteConnectOptions::from_str(&options.url)?
.connect().await?;
for servant in servants {
println!("Loading {:?}", servant);
let query = sqlx::query("insert into servants (name, class_name) values (?, ?)")
.bind(&servant.name)
.bind(&servant.class_name);
let results = query.execute(&mut connection).await?;
println!("{:?}", results);
}
connection.close().await?;
Ok(())
}
|
use bindgen;
use build;
use console::style;
use emoji;
use error::Error;
use indicatif::HumanDuration;
use manifest;
use npm;
#[allow(unused)]
use quicli::prelude::*;
use readme;
use std::fs;
use std::result;
use std::time::Instant;
use PBAR;
#[derive(Debug, StructOpt)]
pub enum Command {
#[structopt(name = "init")]
/// 🐣 initialize a package.json based on your compiled wasm
Init {
path: Option<String>,
#[structopt(long = "scope", short = "s")]
scope: Option<String>,
},
#[structopt(name = "pack")]
/// 🍱 create a tar of your npm package but don't publish! [NOT IMPLEMENTED]
Pack { path: Option<String> },
#[structopt(name = "publish")]
/// 🎆 pack up your npm package and publish! [NOT IMPLEMENTED]
Publish { path: Option<String> },
}
pub fn run_wasm_pack(command: Command) -> result::Result<(), Error> {
// Run the correct command based off input and store the result of it so that we can clear
// the progress bar then return it
let status = match command {
Command::Init { path, scope } => init(path, scope),
Command::Pack { path } => pack(path),
Command::Publish { path } => publish(path),
};
match status {
Ok(_) => {}
Err(ref e) => {
PBAR.error(e.error_type());
}
}
// Make sure we always clear the progress bar before we abort the program otherwise
// stderr and stdout output get eaten up and nothing will work. If this part fails
// to work and clear the progress bars then you're really having a bad day with your tools.
PBAR.done()?;
// Return the actual status of the program to the main function
status
}
// quicli::prelude::* imports a different result struct which gets
// precedence over the std::result::Result, so have had to specify
// the correct type here.
pub fn create_pkg_dir(path: &str) -> result::Result<(), Error> {
let step = format!(
"{} {}Creating a pkg directory...",
style("[3/7]").bold().dim(),
emoji::FOLDER
);
let pb = PBAR.message(&step);
let pkg_dir_path = format!("{}/pkg", path);
fs::create_dir_all(pkg_dir_path)?;
pb.finish();
Ok(())
}
fn init(path: Option<String>, scope: Option<String>) -> result::Result<(), Error> {
let started = Instant::now();
let crate_path = set_crate_path(path);
build::rustup_add_wasm_target()?;
build::cargo_build_wasm(&crate_path)?;
create_pkg_dir(&crate_path)?;
manifest::write_package_json(&crate_path, scope)?;
readme::copy_from_crate(&crate_path)?;
bindgen::cargo_install_wasm_bindgen()?;
let name = manifest::get_crate_name(&crate_path)?;
bindgen::wasm_bindgen_build(&crate_path, &name)?;
PBAR.message(&format!(
"{} Done in {}",
emoji::SPARKLE,
HumanDuration(started.elapsed())
));
PBAR.message(&format!(
"{} Your WASM pkg is ready to publish at {}/pkg",
emoji::PACKAGE,
&crate_path
));
Ok(())
}
fn pack(path: Option<String>) -> result::Result<(), Error> {
let crate_path = set_crate_path(path);
npm::npm_pack(&crate_path)?;
PBAR.message("🎒 packed up your package!");
Ok(())
}
fn publish(path: Option<String>) -> result::Result<(), Error> {
let crate_path = set_crate_path(path);
npm::npm_publish(&crate_path)?;
PBAR.message("💥 published your package!");
Ok(())
}
fn set_crate_path(path: Option<String>) -> String {
let crate_path = match path {
Some(p) => p,
None => ".".to_string(),
};
crate_path
}
|
pub use VkPipelineDynamicStateCreateFlags::*;
#[repr(u32)]
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum VkPipelineDynamicStateCreateFlags {
VK_PIPELINE_DYNAMIC_STATE_CREATE_NULL_BIT = 0,
}
use crate::SetupVkFlags;
#[repr(C)]
#[derive(Clone, Copy, Eq, PartialEq, Hash)]
pub struct VkPipelineDynamicStateCreateFlagBits(u32);
SetupVkFlags!(
VkPipelineDynamicStateCreateFlags,
VkPipelineDynamicStateCreateFlagBits
);
|
//! Controller widgets
use druid::widget::prelude::*;
use druid::{InternalLifeCycle, LensExt, Rect, WidgetExt, WidgetPod};
use crate::consts;
use crate::data::EditorState;
use crate::edit_session::EditSession;
use crate::widgets::{CoordPane, FloatingPanel, GlyphPane, Toolbar};
/// the distance from the edge of a floating panel to the edge of the window.
const FLOATING_PANEL_PADDING: f64 = 24.0;
/// More like this is 'Editor' and 'Editor' is 'Canvas'?
//TODO: we could combine this with controller above if we wanted?
pub struct EditorController<W> {
inner: W,
toolbar: WidgetPod<(), FloatingPanel<Toolbar>>,
coord_panel: WidgetPod<EditorState, FloatingPanel<Box<dyn Widget<EditorState>>>>,
glyph_panel: WidgetPod<EditorState, FloatingPanel<Box<dyn Widget<EditorState>>>>,
}
impl<W> EditorController<W> {
pub fn new(inner: W) -> Self {
EditorController {
inner,
toolbar: WidgetPod::new(FloatingPanel::new(Toolbar::default())),
coord_panel: WidgetPod::new(FloatingPanel::new(
CoordPane::new()
.lens(EditorState::session.then(EditSession::selected_coord.in_arc()))
.boxed(),
)),
glyph_panel: WidgetPod::new(FloatingPanel::new(GlyphPane::new().boxed())),
}
}
}
impl<W: Widget<EditorState>> Widget<EditorState> for EditorController<W> {
fn event(&mut self, ctx: &mut EventCtx, event: &Event, data: &mut EditorState, env: &Env) {
// we would prefer to just handle this event in toolbar but it won't have focus
// and so won't get the key event.
if let Event::KeyDown(k) = event {
if let Some(new_tool) = self.toolbar.widget().inner().tool_for_keypress(k) {
let cmd = consts::cmd::SET_TOOL.with(new_tool);
ctx.submit_command(cmd);
ctx.set_handled();
return;
}
}
self.toolbar.event(ctx, event, &mut (), env);
self.coord_panel.event(ctx, event, data, env);
self.glyph_panel.event(ctx, event, data, env);
if !ctx.is_handled() {
self.inner.event(ctx, event, data, env);
}
}
fn lifecycle(
&mut self,
ctx: &mut LifeCycleCtx,
event: &LifeCycle,
data: &EditorState,
env: &Env,
) {
//HACK: we don't have 'ambient focus', so after the coord panel takes
//focus, and then finishes editing, we need to tell the editor to
//take focus back again so that it can handle keyboard input.
if matches!(event, LifeCycle::Internal(InternalLifeCycle::RouteFocusChanged { new, .. }) if new.is_none())
{
ctx.submit_command(crate::consts::cmd::TAKE_FOCUS);
}
self.toolbar.lifecycle(ctx, event, &(), env);
self.coord_panel.lifecycle(ctx, event, data, env);
self.glyph_panel.lifecycle(ctx, event, data, env);
self.inner.lifecycle(ctx, event, data, env);
}
fn update(
&mut self,
ctx: &mut UpdateCtx,
old_data: &EditorState,
data: &EditorState,
env: &Env,
) {
self.coord_panel.update(ctx, data, env);
self.glyph_panel.update(ctx, data, env);
self.inner.update(ctx, old_data, data, env);
}
fn layout(
&mut self,
ctx: &mut LayoutCtx,
bc: &BoxConstraints,
data: &EditorState,
env: &Env,
) -> Size {
let child_bc = bc.loosen();
let size = self.toolbar.layout(ctx, &child_bc, &(), env);
let orig = (FLOATING_PANEL_PADDING, FLOATING_PANEL_PADDING);
self.toolbar
.set_layout_rect(ctx, &(), env, Rect::from_origin_size(orig, size));
let our_size = self.inner.layout(ctx, bc, data, env);
let coords_size = self.coord_panel.layout(ctx, &child_bc, data, env);
let coords_origin = (
(our_size.width) - coords_size.width - FLOATING_PANEL_PADDING,
our_size.height - coords_size.height - FLOATING_PANEL_PADDING,
);
let coord_frame = Rect::from_origin_size(coords_origin, coords_size);
self.coord_panel
.set_layout_rect(ctx, data, env, coord_frame);
let size = self.glyph_panel.layout(ctx, &child_bc, data, env);
let orig = (
FLOATING_PANEL_PADDING,
our_size.height - size.height - FLOATING_PANEL_PADDING,
);
let frame = Rect::from_origin_size(orig, size);
self.glyph_panel.set_layout_rect(ctx, data, env, frame);
our_size
}
fn paint(&mut self, ctx: &mut PaintCtx, data: &EditorState, env: &Env) {
self.inner.paint(ctx, data, env);
self.coord_panel.paint(ctx, data, env);
self.glyph_panel.paint(ctx, data, env);
self.toolbar.paint(ctx, &(), env);
}
}
|
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
use std::fmt::{self, Display, Formatter};
use std::ops::Deref;
// NOTE: The "witness" types UnicastAddr and MulticastAddr - which provide the
// invariant that the value they contain is a unicast or multicast address
// respectively - cannot actually guarantee this property without certain
// promises from the implementations of the UnicastAddress and MulticastAddress
// traits that they rely on. In particular, the values must be "immutable" in
// the sense that, given only immutable references to the values, nothing about
// the values can change such that the "unicast-ness" or "multicast-ness" of the
// values change. Since the UnicastAddress and MulticastAddress traits are not
// unsafe traits, it would be unsound for unsafe code to rely for its soundness
// on this behavior. For a more in-depth discussion of why this isn't possible
// without an explicit opt-in on the part of the trait implementor, see this
// forum thread: https://users.rust-lang.org/t/prevent-interior-mutability/29403
/// Addresses that can be unicast.
///
/// `UnicastAddress` is implemented by address types for which some values are
/// considered "unicast" addresses. It is only implemented for addresses whose
/// unicast-ness can be determined by looking only at the address itself (this
/// is notably not true for IPv4 addresses, which can be considered broadcast
/// addresses depending on the subnet in which they are used).
pub(crate) trait UnicastAddress {
/// Is this a unicast address?
///
/// `is_unicast` must maintain the invariant that, if it is called twice on
/// the same object, and in between those two calls, no code has operated on
/// a mutable reference to that object, both calls will return the same
/// value. This property is required in order to implement [`UnicastAddr`].
/// Note that, since this is not an `unsafe` trait, `unsafe` code may NOT
/// rely on this property for its soundness. However, code MAY rely on this
/// property for its correctness.
fn is_unicast(&self) -> bool;
}
/// Addresses that can be multicast.
///
/// `MulticastAddress` is implemented by address types for which some values are
/// considered "multicast" addresses.
pub(crate) trait MulticastAddress {
/// Is this a unicast address?
///
/// `is_multicast` must maintain the invariant that, if it is called twice
/// on the same object, and in between those two calls, no code has operated
/// on a mutable reference to that object, both calls will return the same
/// value. This property is required in order to implement
/// [`MulticastAddr`]. Note that, since this is not an `unsafe` trait,
/// `unsafe` code may NOT rely on this property for its soundness. However,
/// code MAY rely on this property for its correctness.
fn is_multicast(&self) -> bool;
}
/// Addresses that can be broadcast.
///
/// `BroadcastAddress` is implemented by address types for which some values are
/// considered "broadcast" addresses.
pub(crate) trait BroadcastAddress {
/// Is this a broadcast address?
fn is_broadcast(&self) -> bool;
}
/// An address which is guaranteed to be a unicast address.
///
/// `UnicastAddr` wraps an address of type `A` and guarantees that it is a
/// unicast address. Note that this guarantee is contingent on a correct
/// implementation of the [`UnicastAddress`]. Since that trait is not `unsafe`,
/// `unsafe` code may NOT rely for its soundness on this guarantee.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub(crate) struct UnicastAddr<A: UnicastAddress>(A);
impl<A: UnicastAddress> UnicastAddr<A> {
/// Construct a new `UnicastAddr`.
///
/// `new` returns `None` if `addr` is not a unicast address according to
/// [`UnicastAddr::is_unicast`].
pub(crate) fn new(addr: A) -> Option<UnicastAddr<A>> {
if !addr.is_unicast() {
return None;
}
Some(UnicastAddr(addr))
}
}
impl<A: UnicastAddress + Clone> UnicastAddr<A> {
/// Get a clone of the address.
pub(crate) fn get(&self) -> A {
self.0.clone()
}
}
impl<A: UnicastAddress> Deref for UnicastAddr<A> {
type Target = A;
fn deref(&self) -> &A {
&self.0
}
}
impl<A: UnicastAddress + Display> Display for UnicastAddr<A> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
/// An address which is guaranteed to be a multicast address.
///
/// `MulticastAddr` wraps an address of type `A` and guarantees that it is a
/// multicast address. Note that this guarantee is contingent on a correct
/// implementation of the [`MulticastAddress`]. Since that trait is not
/// `unsafe`, `unsafe` code may NOT rely for its soundness on this guarantee.
#[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)]
pub(crate) struct MulticastAddr<A: MulticastAddress>(A);
impl<A: MulticastAddress> MulticastAddr<A> {
/// Construct a new `MulticastAddr`.
///
/// `new` returns `None` if `addr` is not a multicast address according to
/// [`MulticastAddr::is_multicast`].
pub(crate) fn new(addr: A) -> Option<MulticastAddr<A>> {
if !addr.is_multicast() {
return None;
}
Some(MulticastAddr(addr))
}
}
impl<A: MulticastAddress + Clone> MulticastAddr<A> {
/// Get a clone of the address.
pub(crate) fn get(&self) -> A {
self.0.clone()
}
}
impl<A: MulticastAddress> Deref for MulticastAddr<A> {
type Target = A;
fn deref(&self) -> &A {
&self.0
}
}
impl<A: MulticastAddress + Display> Display for MulticastAddr<A> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
enum Address {
Unicast,
Multicast,
}
impl UnicastAddress for Address {
fn is_unicast(&self) -> bool {
*self == Address::Unicast
}
}
impl MulticastAddress for Address {
fn is_multicast(&self) -> bool {
*self == Address::Multicast
}
}
#[test]
fn test_unicast_addr() {
assert_eq!(UnicastAddr::new(Address::Unicast), Some(UnicastAddr(Address::Unicast)));
assert_eq!(UnicastAddr::new(Address::Multicast), None);
}
#[test]
fn test_multicast_addr() {
assert_eq!(MulticastAddr::new(Address::Multicast), Some(MulticastAddr(Address::Multicast)));
assert_eq!(MulticastAddr::new(Address::Unicast), None);
}
}
|
#[path = "with_empty_list_arguments/with_loaded_module.rs"]
mod with_loaded_module;
test_substrings!(
without_loaded_module_when_run_exits_undef_and_parent_does_not_exit,
vec!["{parent, alive, true}"],
vec!["Process (#PID<0.3.0>) exited abnormally.", "undef"]
);
|
use super::{
object_heap::{
function::HeapFunction, hir_id::HeapHirId, int::HeapInt, list::HeapList,
struct_::HeapStruct, tag::HeapTag, text::HeapText, HeapData, HeapObject,
},
object_inline::{
builtin::InlineBuiltin,
int::InlineInt,
port::{InlineReceivePort, InlineSendPort},
tag::InlineTag,
InlineData, InlineObject,
},
symbol_table::{impl_ord_with_symbol_table_via_ord, DisplayWithSymbolTable},
Heap, OrdWithSymbolTable, SymbolId, SymbolTable,
};
use crate::{
channel::ChannelId,
fiber::InstructionPointer,
utils::{impl_debug_display_via_debugdisplay, DebugDisplay},
};
use candy_frontend::{builtin_functions::BuiltinFunction, hir::Id};
use derive_more::{Deref, From};
use num_bigint::BigInt;
use num_traits::Signed;
use rustc_hash::FxHashMap;
use std::{
borrow::Cow,
cmp::Ordering,
fmt::{self, Debug, Formatter},
hash::Hash,
intrinsics,
ops::{Shl, Shr},
str,
};
use strum::{EnumDiscriminants, IntoStaticStr};
#[derive(Clone, Copy, EnumDiscriminants, Eq, Hash, IntoStaticStr, PartialEq)]
#[strum_discriminants(derive(IntoStaticStr))]
pub enum Data {
Int(Int),
Tag(Tag),
Text(Text),
List(List),
Struct(Struct),
HirId(HirId),
Function(Function),
Builtin(Builtin),
SendPort(SendPort),
ReceivePort(ReceivePort),
}
impl Data {
pub fn function(&self) -> Option<&Function> {
if let Data::Function(function) = self {
Some(function)
} else {
None
}
}
}
impl From<InlineObject> for Data {
fn from(object: InlineObject) -> Self {
match object.into() {
InlineData::Pointer(pointer) => pointer.get().into(),
InlineData::Int(int) => Data::Int(Int::Inline(int)),
InlineData::Builtin(builtin) => Data::Builtin(Builtin(builtin)),
InlineData::Tag(symbol_id) => Data::Tag(Tag::Inline(symbol_id)),
InlineData::SendPort(send_port) => Data::SendPort(SendPort(send_port)),
InlineData::ReceivePort(receive_port) => Data::ReceivePort(ReceivePort(receive_port)),
}
}
}
impl From<HeapObject> for Data {
fn from(object: HeapObject) -> Self {
match object.into() {
HeapData::Int(int) => Data::Int(Int::Heap(int)),
HeapData::List(list) => Data::List(List(list)),
HeapData::Struct(struct_) => Data::Struct(Struct(struct_)),
HeapData::Tag(tag) => Data::Tag(Tag::Heap(tag)),
HeapData::Text(text) => Data::Text(Text(text)),
HeapData::Function(function) => Data::Function(Function(function)),
HeapData::HirId(hir_id) => Data::HirId(HirId(hir_id)),
}
}
}
impl Debug for Data {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Data::Int(int) => Debug::fmt(int, f),
Data::Tag(tag) => Debug::fmt(tag, f),
Data::Text(text) => Debug::fmt(text, f),
Data::List(list) => Debug::fmt(list, f),
Data::Struct(struct_) => Debug::fmt(struct_, f),
Data::HirId(hir_id) => Debug::fmt(hir_id, f),
Data::Function(function) => Debug::fmt(function, f),
Data::Builtin(builtin) => Debug::fmt(builtin, f),
Data::SendPort(send_port) => Debug::fmt(send_port, f),
Data::ReceivePort(receive_port) => Debug::fmt(receive_port, f),
}
}
}
impl DisplayWithSymbolTable for Data {
fn fmt(&self, f: &mut Formatter, symbol_table: &SymbolTable) -> fmt::Result {
match self {
Data::Int(int) => DisplayWithSymbolTable::fmt(int, f, symbol_table),
Data::Tag(tag) => DisplayWithSymbolTable::fmt(tag, f, symbol_table),
Data::Text(text) => DisplayWithSymbolTable::fmt(text, f, symbol_table),
Data::List(list) => DisplayWithSymbolTable::fmt(list, f, symbol_table),
Data::Struct(struct_) => DisplayWithSymbolTable::fmt(struct_, f, symbol_table),
Data::HirId(hir_id) => DisplayWithSymbolTable::fmt(hir_id, f, symbol_table),
Data::Function(function) => DisplayWithSymbolTable::fmt(function, f, symbol_table),
Data::Builtin(builtin) => DisplayWithSymbolTable::fmt(builtin, f, symbol_table),
Data::SendPort(send_port) => DisplayWithSymbolTable::fmt(send_port, f, symbol_table),
Data::ReceivePort(receive_port) => {
DisplayWithSymbolTable::fmt(receive_port, f, symbol_table)
}
}
}
}
impl OrdWithSymbolTable for Data {
fn cmp(&self, symbol_table: &SymbolTable, other: &Self) -> Ordering {
match (self, other) {
(Data::Int(this), Data::Int(other)) => Ord::cmp(this, other),
(Data::Tag(this), Data::Tag(other)) => {
OrdWithSymbolTable::cmp(this, symbol_table, other)
}
(Data::Text(this), Data::Text(other)) => Ord::cmp(this, other),
(Data::List(this), Data::List(other)) => {
OrdWithSymbolTable::cmp(this, symbol_table, other)
}
(Data::Struct(this), Data::Struct(other)) => {
OrdWithSymbolTable::cmp(this, symbol_table, other)
}
(Data::HirId(this), Data::HirId(other)) => Ord::cmp(this, other),
(Data::Function(this), Data::Function(other)) => Ord::cmp(this, other),
(Data::Builtin(this), Data::Builtin(other)) => Ord::cmp(this, other),
(Data::SendPort(this), Data::SendPort(other)) => Ord::cmp(this, other),
(Data::ReceivePort(this), Data::ReceivePort(other)) => Ord::cmp(this, other),
_ => intrinsics::discriminant_value(self).cmp(&intrinsics::discriminant_value(other)),
}
}
}
// Int
// FIXME: Custom Ord, PartialOrd impl
#[derive(Clone, Copy, Eq, From, Hash, PartialEq)]
pub enum Int {
Inline(InlineInt),
Heap(HeapInt),
}
impl Int {
pub fn create<T>(heap: &mut Heap, is_reference_counted: bool, value: T) -> Self
where
T: Copy + TryInto<i64> + Into<BigInt>,
{
value
.try_into()
.map_err(|_| ())
.and_then(InlineInt::try_from)
.map(|it| it.into())
.unwrap_or_else(|_| HeapInt::create(heap, is_reference_counted, value.into()).into())
}
pub fn create_from_bigint(heap: &mut Heap, is_reference_counted: bool, value: BigInt) -> Self {
i64::try_from(&value)
.map_err(|_| ())
.and_then(InlineInt::try_from)
.map(|it| it.into())
.unwrap_or_else(|_| HeapInt::create(heap, is_reference_counted, value).into())
}
pub fn get<'a>(self) -> Cow<'a, BigInt> {
match self {
Int::Inline(int) => Cow::Owned(int.get().into()),
Int::Heap(int) => Cow::Borrowed(int.get()),
}
}
pub fn try_get<T>(self) -> Option<T>
where
T: TryFrom<i64> + for<'a> TryFrom<&'a BigInt>,
{
match self {
Int::Inline(int) => int.try_get(),
Int::Heap(int) => int.get().try_into().ok(),
}
}
operator_fn!(add);
operator_fn!(subtract);
operator_fn!(multiply);
operator_fn!(int_divide_truncating);
operator_fn!(remainder);
pub fn modulo(self, heap: &mut Heap, rhs: Int) -> Self {
match (self, rhs) {
(Int::Inline(lhs), Int::Inline(rhs)) => lhs.modulo(heap, rhs),
(Int::Heap(on_heap), Int::Inline(inline))
| (Int::Inline(inline), Int::Heap(on_heap)) => {
on_heap.modulo(heap, &inline.get().into())
}
(Int::Heap(lhs), Int::Heap(rhs)) => lhs.modulo(heap, rhs.get()),
}
}
pub fn compare_to(self, rhs: Int) -> Tag {
match (self, rhs) {
(Int::Inline(lhs), rhs) => lhs.compare_to(rhs),
(Int::Heap(lhs), Int::Inline(rhs)) => lhs.compare_to(&rhs.get().into()),
(Int::Heap(lhs), Int::Heap(rhs)) => lhs.compare_to(rhs.get()),
}
}
shift_fn!(shift_left, shl);
shift_fn!(shift_right, shr);
pub fn bit_length(self, heap: &mut Heap) -> Self {
match self {
Int::Inline(int) => int.bit_length().into(),
Int::Heap(int) => int.bit_length(heap),
}
}
bitwise_fn!(bitwise_and);
bitwise_fn!(bitwise_or);
bitwise_fn!(bitwise_xor);
}
macro_rules! bitwise_fn {
($name:ident) => {
pub fn $name(self, heap: &mut Heap, rhs: Int) -> Self {
match (self, rhs) {
(Int::Inline(lhs), Int::Inline(rhs)) => lhs.$name(rhs).into(),
(Int::Heap(on_heap), Int::Inline(inline))
| (Int::Inline(inline), Int::Heap(on_heap)) => {
on_heap.$name(heap, &inline.get().into())
}
(Int::Heap(lhs), Int::Heap(rhs)) => lhs.$name(heap, rhs.get()),
}
}
};
}
macro_rules! operator_fn {
($name:ident) => {
pub fn $name(self, heap: &mut Heap, rhs: Int) -> Self {
match (self, rhs) {
(Int::Inline(lhs), _) => lhs.$name(heap, rhs),
(Int::Heap(lhs), Int::Inline(rhs)) => lhs.$name(heap, rhs.get()),
(Int::Heap(lhs), Int::Heap(rhs)) => lhs.$name(heap, rhs.get()),
}
}
};
}
macro_rules! shift_fn {
($name:ident, $function:ident) => {
pub fn $name(self, heap: &mut Heap, rhs: Int) -> Self {
match (self, rhs) {
(Int::Inline(lhs), Int::Inline(rhs)) => lhs.$name(heap, rhs),
// TODO: Support shifting by larger numbers
(Int::Inline(lhs), rhs) => Int::create_from_bigint(
heap,
true,
BigInt::from(lhs.get()).$function(rhs.try_get::<i128>().unwrap()),
),
(Int::Heap(lhs), rhs) => lhs.$name(heap, rhs.try_get::<i128>().unwrap()),
}
}
};
}
use {bitwise_fn, operator_fn, shift_fn};
impl DebugDisplay for Int {
fn fmt(&self, f: &mut Formatter, is_debug: bool) -> fmt::Result {
match self {
Int::Inline(int) => DebugDisplay::fmt(int, f, is_debug),
Int::Heap(int) => DebugDisplay::fmt(int, f, is_debug),
}
}
}
impl_debug_display_via_debugdisplay!(Int);
impl From<Int> for InlineObject {
fn from(value: Int) -> Self {
match value {
Int::Inline(int) => *int,
Int::Heap(int) => (*int).into(),
}
}
}
impl_try_froms!(Int, "Expected an int.");
impl_try_from_heap_object!(Int, "Expected an int.");
impl Ord for Int {
fn cmp(&self, other: &Self) -> Ordering {
match (self, other) {
(Int::Inline(this), Int::Inline(other)) => Ord::cmp(this, other),
(Int::Inline(_), Int::Heap(other)) => {
if other.get().is_positive() {
Ordering::Less
} else {
Ordering::Greater
}
}
(Int::Heap(this), Int::Heap(other)) => Ord::cmp(this, other),
(Int::Heap(this), Int::Inline(_)) => {
if this.get().is_positive() {
Ordering::Greater
} else {
Ordering::Less
}
}
}
}
}
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
impl PartialOrd for Int {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
Some(Ord::cmp(self, other))
}
}
impl_ord_with_symbol_table_via_ord!(Int);
// Tag
#[derive(Clone, Copy, Eq, From, Hash, PartialEq)]
pub enum Tag {
Inline(InlineTag),
Heap(HeapTag),
}
impl Tag {
pub fn create(symbol_id: SymbolId) -> Self {
Tag::Inline(symbol_id.into())
}
pub fn create_with_value(
heap: &mut Heap,
is_reference_counted: bool,
symbol_id: SymbolId,
value: impl Into<InlineObject>,
) -> Self {
HeapTag::create(heap, is_reference_counted, symbol_id, value).into()
}
pub fn create_with_value_option(
heap: &mut Heap,
is_reference_counted: bool,
symbol_id: SymbolId,
value: impl Into<Option<InlineObject>>,
) -> Self {
match value.into() {
Some(value) => Self::create_with_value(heap, is_reference_counted, symbol_id, value),
None => Self::create(symbol_id),
}
}
pub fn create_nothing() -> Self {
Self::create(SymbolId::NOTHING)
}
pub fn create_bool(value: bool) -> Self {
let symbol_id = if value {
SymbolId::TRUE
} else {
SymbolId::FALSE
};
Self::create(symbol_id)
}
pub fn create_ordering(value: Ordering) -> Self {
let value = match value {
Ordering::Less => SymbolId::LESS,
Ordering::Equal => SymbolId::EQUAL,
Ordering::Greater => SymbolId::GREATER,
};
Self::create(value)
}
pub fn create_result(
heap: &mut Heap,
is_reference_counted: bool,
value: Result<InlineObject, InlineObject>,
) -> Self {
let (symbol, value) = match value {
Ok(it) => (SymbolId::OK, it),
Err(it) => (SymbolId::ERROR, it),
};
Self::create_with_value(heap, is_reference_counted, symbol, value)
}
pub fn symbol_id(&self) -> SymbolId {
match self {
Tag::Inline(tag) => tag.get(),
Tag::Heap(tag) => tag.symbol_id(),
}
}
pub fn has_value(&self) -> bool {
match self {
Tag::Inline(_) => false,
Tag::Heap(_) => true,
}
}
pub fn value(&self) -> Option<InlineObject> {
match self {
Tag::Inline(_) => None,
Tag::Heap(tag) => Some(tag.value()),
}
}
pub fn without_value(self) -> Tag {
Tag::create(self.symbol_id())
}
}
impl Debug for Tag {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
match self {
Tag::Inline(tag) => Debug::fmt(tag, f),
Tag::Heap(tag) => Debug::fmt(tag, f),
}
}
}
impl DisplayWithSymbolTable for Tag {
fn fmt(&self, f: &mut Formatter, symbol_table: &SymbolTable) -> fmt::Result {
match self {
Tag::Inline(tag) => DisplayWithSymbolTable::fmt(tag, f, symbol_table),
Tag::Heap(tag) => DisplayWithSymbolTable::fmt(tag, f, symbol_table),
}
}
}
impl From<Tag> for InlineObject {
fn from(value: Tag) -> Self {
match value {
Tag::Inline(value) => *value,
Tag::Heap(value) => (*value).into(),
}
}
}
impl OrdWithSymbolTable for Tag {
fn cmp(&self, symbol_table: &SymbolTable, other: &Self) -> Ordering {
symbol_table
.get(self.symbol_id())
.cmp(symbol_table.get(other.symbol_id()))
.then_with(|| self.value().cmp(symbol_table, &other.value()))
}
}
impl_try_froms!(Tag, "Expected a tag.");
impl_try_from_heap_object!(Tag, "Expected a tag.");
impl TryFrom<InlineObject> for bool {
type Error = &'static str;
fn try_from(value: InlineObject) -> Result<Self, Self::Error> {
(Data::from(value)).try_into()
}
}
impl TryFrom<Data> for bool {
type Error = &'static str;
fn try_from(value: Data) -> Result<Self, Self::Error> {
match value {
Data::Tag(Tag::Inline(tag)) => match tag.get() {
SymbolId::TRUE => Ok(true),
SymbolId::FALSE => Ok(false),
_ => Err("Expected `True` or `False`."),
},
_ => Err("Expected a tag without a value, found {value:?}."),
}
}
}
// Text
#[derive(Clone, Copy, Deref, Eq, From, Hash, Ord, PartialEq, PartialOrd)]
pub struct Text(HeapText);
impl Text {
pub fn create(heap: &mut Heap, is_reference_counted: bool, value: &str) -> Self {
HeapText::create(heap, is_reference_counted, value).into()
}
pub fn create_from_utf8(heap: &mut Heap, is_reference_counted: bool, bytes: &[u8]) -> Tag {
let result = str::from_utf8(bytes)
.map(|it| Text::create(heap, is_reference_counted, it).into())
.map_err(|_| Text::create(heap, is_reference_counted, "Invalid UTF-8.").into());
Tag::create_result(heap, is_reference_counted, result)
}
}
impls_via_0!(Text);
impl_try_froms!(Text, "Expected a text.");
impl_try_from_heap_object!(Text, "Expected a text.");
impl_ord_with_symbol_table_via_ord!(Text);
// List
#[derive(Clone, Copy, Deref, Eq, From, Hash, PartialEq)]
pub struct List(HeapList);
impl List {
pub fn create(heap: &mut Heap, is_reference_counted: bool, items: &[InlineObject]) -> Self {
HeapList::create(heap, is_reference_counted, items).into()
}
}
impls_via_0_with_symbol_table!(List);
impl_try_froms!(List, "Expected a list.");
impl_try_from_heap_object!(List, "Expected a list.");
// Struct
#[derive(Clone, Copy, Deref, Eq, From, Hash, PartialEq)]
pub struct Struct(HeapStruct);
impl Struct {
pub fn create(
heap: &mut Heap,
is_reference_counted: bool,
fields: &FxHashMap<InlineObject, InlineObject>,
) -> Self {
HeapStruct::create(heap, is_reference_counted, fields).into()
}
pub fn create_with_symbol_keys(
heap: &mut Heap,
is_reference_counted: bool,
fields: impl IntoIterator<Item = (SymbolId, InlineObject)>,
) -> Self {
let fields = fields
.into_iter()
.map(|(key, value)| ((Tag::create(key)).into(), value))
.collect();
Self::create(heap, is_reference_counted, &fields)
}
}
impls_via_0_with_symbol_table!(Struct);
impl_try_froms!(Struct, "Expected a struct.");
impl_try_from_heap_object!(Struct, "Expected a struct.");
// Function
#[derive(Clone, Copy, Deref, Eq, From, Hash, Ord, PartialEq, PartialOrd)]
pub struct Function(HeapFunction);
impl Function {
pub fn create(
heap: &mut Heap,
is_reference_counted: bool,
captured: &[InlineObject],
argument_count: usize,
body: InstructionPointer,
) -> Self {
HeapFunction::create(heap, is_reference_counted, captured, argument_count, body).into()
}
}
impls_via_0!(Function);
impl_try_froms!(Function, "Expected a function.");
impl_try_from_heap_object!(Function, "Expected a function.");
impl_ord_with_symbol_table_via_ord!(Function);
// HIR ID
#[derive(Clone, Copy, Deref, Eq, From, Hash, Ord, PartialEq, PartialOrd)]
pub struct HirId(HeapHirId);
impl HirId {
pub fn create(heap: &mut Heap, is_reference_counted: bool, id: Id) -> HirId {
HeapHirId::create(heap, is_reference_counted, id).into()
}
}
impls_via_0!(HirId);
impl_try_froms!(HirId, "Expected a HIR ID.");
impl_try_from_heap_object!(HirId, "Expected a HIR ID.");
impl_ord_with_symbol_table_via_ord!(HirId);
// Builtin
#[derive(Clone, Copy, Deref, Eq, From, Hash, Ord, PartialEq, PartialOrd)]
pub struct Builtin(InlineBuiltin);
impl Builtin {
pub fn create(builtin: BuiltinFunction) -> Self {
InlineBuiltin::from(builtin).into()
}
}
impls_via_0!(Builtin);
impl_ord_with_symbol_table_via_ord!(Builtin);
// Send Port
#[derive(Clone, Copy, Deref, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct SendPort(InlineSendPort);
impl SendPort {
pub fn create(heap: &mut Heap, channel_id: ChannelId) -> InlineObject {
InlineSendPort::create(heap, channel_id)
}
}
impls_via_0!(SendPort);
impl_ord_with_symbol_table_via_ord!(SendPort);
impl_try_froms!(SendPort, "Expected a send port.");
// Receive Port
#[derive(Clone, Copy, Deref, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct ReceivePort(InlineReceivePort);
impl ReceivePort {
pub fn create(heap: &mut Heap, channel_id: ChannelId) -> InlineObject {
InlineReceivePort::create(heap, channel_id)
}
}
impls_via_0!(ReceivePort);
impl_ord_with_symbol_table_via_ord!(ReceivePort);
impl_try_froms!(ReceivePort, "Expected a receive port.");
// Utils
macro_rules! impls_via_0 {
($type:ty) => {
impl DebugDisplay for $type {
fn fmt(&self, f: &mut Formatter, is_debug: bool) -> fmt::Result {
DebugDisplay::fmt(&self.0, f, is_debug)
}
}
impl_debug_display_via_debugdisplay!($type);
impl From<$type> for InlineObject {
fn from(value: $type) -> Self {
(**value).into()
}
}
};
}
macro_rules! impls_via_0_with_symbol_table {
($type:ty) => {
impl Debug for $type {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
Debug::fmt(&self.0, f)
}
}
impl DisplayWithSymbolTable for $type {
fn fmt(&self, f: &mut Formatter, symbol_table: &SymbolTable) -> fmt::Result {
DisplayWithSymbolTable::fmt(&self.0, f, symbol_table)
}
}
impl From<$type> for InlineObject {
fn from(value: $type) -> Self {
(**value).into()
}
}
impl OrdWithSymbolTable for $type {
fn cmp(&self, symbol_table: &SymbolTable, other: &Self) -> Ordering {
OrdWithSymbolTable::cmp(&self.0, symbol_table, &other.0)
}
}
};
}
macro_rules! impl_try_froms {
($type:tt, $error_message:expr$(,)?) => {
impl TryFrom<InlineObject> for $type {
type Error = &'static str;
fn try_from(value: InlineObject) -> Result<Self, Self::Error> {
Data::from(value).try_into()
}
}
impl TryFrom<Data> for $type {
type Error = &'static str;
fn try_from(value: Data) -> Result<Self, Self::Error> {
match value {
Data::$type(it) => Ok(it),
_ => Err($error_message),
}
}
}
impl<'a> TryFrom<&'a Data> for &'a $type {
type Error = &'static str;
fn try_from(value: &'a Data) -> Result<Self, Self::Error> {
match &value {
Data::$type(it) => Ok(it),
_ => Err($error_message),
}
}
}
};
}
macro_rules! impl_try_from_heap_object {
($type:tt, $error_message:expr$(,)?) => {
impl TryFrom<HeapObject> for $type {
type Error = &'static str;
fn try_from(value: HeapObject) -> Result<Self, Self::Error> {
Data::from(value).try_into()
}
}
};
}
use {impl_try_from_heap_object, impl_try_froms, impls_via_0, impls_via_0_with_symbol_table};
|
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug)]
pub enum ErrorKind {
IoError(std::io::Error),
Utf8Error(std::str::Utf8Error),
Other(String),
}
#[derive(Debug)]
pub struct Error {
kind: ErrorKind,
}
impl Error {
pub fn new<T>(kind: T) -> Error
where T: Into<ErrorKind> {
Error {
kind: kind.into()
}
}
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match &self.kind {
ErrorKind::IoError(err) => {
err.fmt(f)
},
ErrorKind::Utf8Error(err) => {
err.fmt(f)
},
ErrorKind::Other(message) => {
write!(f, "Quantum Error: {}", message)
},
}
}
}
impl std::error::Error for Error {}
impl From<&str> for Error {
fn from(message: &str) -> Error {
Error {
kind: ErrorKind::Other(message.to_owned())
}
}
}
impl From<String> for Error {
fn from(message: String) -> Error {
Error {
kind: ErrorKind::Other(message)
}
}
}
impl From<std::io::Error> for Error {
fn from(err: std::io::Error) -> Error {
Error {
kind: ErrorKind::IoError(err)
}
}
}
impl From<std::str::Utf8Error> for Error {
fn from(err: std::str::Utf8Error) -> Error {
Error {
kind: ErrorKind::Utf8Error(err)
}
}
}
|
use n3_machine_ffi::{Machine, Program, SignalHandler, WorkHandler, WorkStatus};
use n3_torch_ffi::PyMachine;
pub struct PyMachineBase<T>
where
T: PyMachine + 'static,
{
inner: T,
handler: Option<WorkHandler>,
}
impl<T> PyMachineBase<T>
where
T: PyMachine + 'static,
{
pub fn new(inner: T) -> Self {
Self {
inner,
handler: None,
}
}
pub fn into_box_trait(self) -> Box<dyn Machine> {
Box::new(self)
}
}
impl<T> Machine for PyMachineBase<T>
where
T: PyMachine,
{
fn spawn(&mut self, program: &mut Program, handler: &SignalHandler) -> WorkStatus {
if self.handler.is_some() {
return self.status();
}
let handler = WorkHandler::new_with_signal(&program.id, handler).unwrap();
handler.start().unwrap();
self.inner.py_spawn(program, &handler).unwrap();
self.handler = Some(handler);
self.status()
}
fn status(&mut self) -> WorkStatus {
if let Some(handler) = &self.handler {
handler.status().unwrap()
} else {
WorkStatus::default()
}
}
fn join(&mut self) -> WorkStatus {
self.terminate()
}
fn terminate(&mut self) -> WorkStatus {
self.inner.py_terminate().unwrap();
self.status()
}
}
|
use gl;
use std;
use std::ffi::{CString, CStr};
use std::collections::HashMap;
use std::cell::RefCell;
#[derive(Debug)]
pub struct ShaderPart {
id: u32,
}
impl ShaderPart {
pub fn from_source(source: &CStr, kind: gl::types::GLenum) -> Result<ShaderPart, String> {
let id = shader_from_source(source, kind)?;
Ok(ShaderPart { id })
}
pub fn from_vert_source(source: &CStr) -> Result<ShaderPart, String> {
ShaderPart::from_source(source, gl::VERTEX_SHADER)
}
pub fn from_frag_source(source: &CStr) -> Result<ShaderPart, String> {
ShaderPart::from_source(source, gl::FRAGMENT_SHADER)
}
}
impl Drop for ShaderPart {
fn drop(&mut self) {
gl_call!(gl::DeleteShader(self.id));
}
}
fn shader_from_source(source: &CStr, kind: gl::types::GLenum) -> Result<gl::types::GLuint, String> {
let id = gl_call!(gl::CreateShader(kind));
gl_call!(gl::ShaderSource(id, 1, &source.as_ptr(), std::ptr::null()));
gl_call!(gl::CompileShader(id));
let mut success: gl::types::GLint = 1;
gl_call!(gl::GetShaderiv(id, gl::COMPILE_STATUS, &mut success));
if success == 0 {
let mut len: gl::types::GLint = 0;
gl_call!(gl::GetShaderiv(id, gl::INFO_LOG_LENGTH, &mut len));
let error = create_whitespace_cstring_with_len(len as usize);
gl_call!(gl::GetShaderInfoLog(
id,
len,
std::ptr::null_mut(),
error.as_ptr() as *mut gl::types::GLchar,
));
return Err(error.to_string_lossy().into_owned());
}
Ok(id)
}
fn create_whitespace_cstring_with_len(len: usize) -> CString {
// allocate buffer of correct size
let mut buffer: Vec<u8> = Vec::with_capacity(len + 1);
// fill it with len spaces
buffer.extend([b' '].iter().cycle().take(len));
// convert buffer to CString
unsafe { CString::from_vec_unchecked(buffer) }
}
#[derive(Debug)]
#[derive(Clone)]
pub struct ShaderProgram {
id: u32,
uniform_cache: RefCell<HashMap<String, i32>>
}
impl ShaderProgram {
pub fn use_program(&self) {
gl_call!(gl::UseProgram(self.id));
}
fn get_uniform_location(&self, name: &str) -> i32 {
let location = self.uniform_cache.borrow().get(name).cloned();
match location {
None => {
let c_name = CString::new(name).unwrap();
let location = gl_call!(gl::GetUniformLocation(self.id, c_name.as_ptr()));
// Error checking
if location == -1 {
panic!("Can't find uniform '{}' in program with id: {}", name, self.id);
}
println!("New uniform location {}: {}", &name, &location);
self.uniform_cache.borrow_mut().insert(name.to_owned(), location);
location
},
Some(location) => location,
}
}
pub fn set_uniform2f(&self, name: &str, values: &[f32]) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform2f(location, values[0], values[1]));
self
}
pub fn set_uniform3f(&self, name: &str, values: &[f32]) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform3f(location, values[0], values[1], values[2]));
self
}
pub fn set_uniform4f(&self, name: &str, values: &[f32]) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform4f(location, values[0], values[1], values[2], values[3]));
self
}
pub fn set_uniform_matrix4fv(&self, name: &str, matrix: *const f32) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::UniformMatrix4fv(location, 1, gl::FALSE, matrix));
self
}
pub fn set_uniform1fv(&self, name: &str, vec: &[f32]) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform1fv(location, vec.len() as i32, vec.as_ptr()));
self
}
pub fn set_uniform1f(&self, name: &str, value: f32) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform1f(location, value));
self
}
pub fn set_uniform1i(&self, name: &str, value: i32) -> &Self {
let location = self.get_uniform_location(name);
gl_call!(gl::Uniform1i(location, value));
self
}
pub fn from_shaders(vertex: ShaderPart, fragment: ShaderPart) -> Result<ShaderProgram, String> {
let program_id = gl_call!(gl::CreateProgram());
gl_call!(gl::AttachShader(program_id, vertex.id));
gl_call!(gl::AttachShader(program_id, fragment.id));
gl_call!(gl::LinkProgram(program_id));
// Error checking
let mut success: gl::types::GLint = 1;
gl_call!(gl::GetProgramiv(program_id, gl::LINK_STATUS, &mut success));
if success == 0 {
let mut len: gl::types::GLint = 0;
gl_call!(gl::GetProgramiv(program_id, gl::INFO_LOG_LENGTH, &mut len));
let error = create_whitespace_cstring_with_len(len as usize);
gl_call!(gl::GetProgramInfoLog(
program_id,
len,
std::ptr::null_mut(),
error.as_ptr() as *mut gl::types::GLchar
));
return Err(error.to_string_lossy().into_owned());
}
gl_call!(gl::DetachShader(program_id, vertex.id));
gl_call!(gl::DetachShader(program_id, fragment.id));
Ok(ShaderProgram { id: program_id, uniform_cache: RefCell::new(HashMap::new()) })
}
}
impl Drop for ShaderProgram {
fn drop(&mut self) {
gl_call!(gl::DeleteProgram(self.id));
}
} |
use rand::{thread_rng, Rng};
/// room number as usize so it can index into the map.
pub type RoomNum = usize;
pub const NUM_OF_ROOMS: RoomNum = 20;
/// The game map in Hunt the Wumpus is laid out as a dodecahedron. The vertices
/// of the dodecahedron are considered rooms, and each room has 3 adjacent rooms.
/// A room is adjacent if it has a line segment directly from one vertex to
/// another. Here we have a 2D array where the first dimension represents the 20
/// rooms (index + 1 == room number). the second dimension is an array of the
/// adjacent rooms. I just hard coded some valid room values here for ease, but
/// there is a formula that could be used to derive instead.
pub static MAP: [[RoomNum; 3]; NUM_OF_ROOMS] = [
[2, 5, 8],
[1, 3, 10],
[2, 4, 12],
[3, 5, 14],
[1, 4, 6],
[5, 7, 15],
[6, 8, 17],
[1, 7, 9],
[8, 10, 18],
[2, 9, 11],
[10, 12, 19],
[3, 11, 13],
[12, 14, 20],
[4, 13, 15],
[6, 14, 16],
[15, 17, 20],
[7, 16, 18],
[9, 17, 19],
[11, 18, 20],
[13, 16, 19]
];
/// returns true if the two given rooms are adjacent.
pub fn is_adj(next: RoomNum, current: RoomNum) -> bool {
if current > 0 && current <= MAP.len() {
let adj_rooms = MAP[current - 1];
let adj1 = adj_rooms[0];
let adj2 = adj_rooms[1];
let adj3 = adj_rooms[2];
next == adj1 || next == adj2 || next == adj3
} else {
false
}
}
/// Get a random room on the map.
pub fn rand_room() -> RoomNum {
thread_rng().gen_range(1, MAP.len() + 1)
}
/// Get a tuple of adjacent rooms.
pub fn adj_rooms_to(room: RoomNum) -> (RoomNum, RoomNum, RoomNum) {
let adj_rooms = MAP[room - 1];
(adj_rooms[0], adj_rooms[1], adj_rooms[2])
}
/// Get a random room adjacent to the given room.
pub fn rand_adj_room_to(room: RoomNum) -> RoomNum {
let adj_rooms = MAP[room - 1];
let i = thread_rng().gen_range(0, adj_rooms.len());
adj_rooms[i]
}
pub fn gen_rand_valid_path_from(len: usize, starting: RoomNum) -> Vec<RoomNum> {
let mut valid_path = Vec::with_capacity(len);
for i in 0..len {
if i == 0 {
valid_path.push(starting);
} else if i == 1 {
let prev = valid_path[i - 1];
valid_path.push(rand_adj_room_to(prev));
} else {
let prev = valid_path[i - 1];
let before_prev = valid_path[i - 2];
valid_path.push(rand_valid_adj_room_to(prev, before_prev));
}
}
valid_path
}
/// Gets a random room adjacent to the given room, but not equal to the previous
/// room. Useful for avoiding "too crooked" paths.
pub fn rand_valid_adj_room_to(room: RoomNum, previous_room: RoomNum) -> RoomNum {
loop {
let r = rand_adj_room_to(room);
if r != previous_room {
return r;
}
}
}
#[cfg(test)]
pub mod map_tests {
use super::*;
/// Generate a valid arrow path of given length.
pub fn gen_rand_valid_path_of_len(n: usize) -> Vec<RoomNum> {
gen_rand_valid_path_from(n, rand_room())
}
/// One property that exists for the map is if current room is in bounds of
/// the map and strictly less than the map length, then we should always be
/// able to move to the room (current + 1).
#[quickcheck]
fn can_move_to_next_room_num_property(current: RoomNum) -> bool {
let is_adj = is_adj(current, current + 1);
if current > 0 && current < MAP.len() {
is_adj
} else {
!is_adj
}
}
#[test]
fn can_get_adj_rooms() {
let expected = (13, 16, 19);
let actual = adj_rooms_to(20);
assert_eq!(expected, actual);
}
}
|
pub const NET_PORT: u16 = 32870;
use std::net::UdpSocket;
/// Opens UDP socket for client on a random open port.
pub fn open_client_socket() -> std::io::Result<UdpSocket> {
UdpSocket::bind("0.0.0.0:0")
}
/// Opens UDP socket for server on configured port.
pub fn open_server_socket() -> std::io::Result<UdpSocket> {
UdpSocket::bind(format!("0.0.0.0:{}", NET_PORT))
}
|
use clap::{App, Arg, ArgMatches, SubCommand};
pub fn get_matches() -> ArgMatches<'static> {
let file_arg = Arg::with_name("file")
.short("f")
.long("file")
.takes_value(true)
.required(true)
.value_name("file name")
.help("The file name (required)");
let collection_ls_subcommand = SubCommand::with_name("list")
.alias("l")
.arg(file_arg.clone())
.about("List the collection elements");
let collection_stats_subcommand = SubCommand::with_name("stats")
.alias("s")
.arg(file_arg.clone())
.about("Calculate the collection statistics");
let collection_depot_subcommand = SubCommand::with_name("depot")
.alias("d")
.arg(file_arg.clone())
.about("Extract the depot information for locomotives");
let collection_csv_subcommand = SubCommand::with_name("csv")
.alias("c")
.arg(file_arg.clone())
.arg(
Arg::with_name("output-file")
.short("o")
.long("output")
.takes_value(true)
.required(true)
.value_name("file name")
.help("The output file name (required)"),
)
.about("Export the collection as csv file");
let collection_subcommand = SubCommand::with_name("collection")
.alias("c")
.subcommand(collection_ls_subcommand)
.subcommand(collection_csv_subcommand)
.subcommand(collection_stats_subcommand)
.subcommand(collection_depot_subcommand)
.about("Manage model railway collections");
let wishlist_ls_subcommand = SubCommand::with_name("list")
.alias("l")
.arg(file_arg.clone())
.about("List the wishlist elements");
let wishlist_budget_subcommand = SubCommand::with_name("budget")
.alias("b")
.arg(file_arg.clone())
.about("Calculate the wishlist required budget");
let wishlist_subcommand = SubCommand::with_name("wishlist")
.alias("w")
.subcommand(wishlist_ls_subcommand)
.subcommand(wishlist_budget_subcommand)
.about("Manage model railway wishlist");
// let migrate_subcommand = SubCommand::with_name("migrate")
// .arg(
// Arg::with_name("file")
// .short("f")
// .long("file")
// .takes_value(true)
// .required(true)
// .value_name("file name")
// .help("The file name (required)"),
// )
// .about("Migrate yaml file");
App::new("railists")
.version(env!("CARGO_PKG_VERSION"))
.about("Model railway collection manager")
.author(env!("CARGO_PKG_AUTHORS"))
.subcommand(collection_subcommand)
.subcommand(wishlist_subcommand)
.get_matches()
}
|
use mini_core::Sync;
pub struct Struct3 {
pub field1: &'static [u8],
pub field2: i32,
}
unsafe impl Sync for Struct3 {}
pub static STRUCT3: Struct3 = Struct3 {
field1: b"level1",
field2: 1,
};
|
#![allow(dead_code)]
//! Standard clipboard formats.
//!
//! Header: Winuser.h
//!
//! Description is taken from [Standard Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
///A handle to a bitmap (HBITMAP).
pub const CF_BITMAP: u32 = 2;
///A memory object containing a <b>BITMAPINFO</b> structure followed by the bitmap bits.
pub const CF_DIB: u32 = 8;
///A memory object containing a <b>BITMAPV5HEADER</b> structure followed by the bitmap color space
///information and the bitmap bits.
pub const CF_DIBV5: u32 = 17;
///Software Arts' Data Interchange Format.
pub const CF_DIF: u32 = 5;
///Bitmap display format associated with a private format. The hMem parameter must be a handle to
///data that can be displayed in bitmap format in lieu of the privately formatted data.
pub const CF_DSPBITMAP: u32 = 0x0082;
///Enhanced metafile display format associated with a private format. The *hMem* parameter must be a
///handle to data that can be displayed in enhanced metafile format in lieu of the privately
///formatted data.
pub const CF_DSPENHMETAFILE: u32 = 0x008E;
///Metafile-picture display format associated with a private format. The hMem parameter must be a
///handle to data that can be displayed in metafile-picture format in lieu of the privately
///formatted data.
pub const CF_DSPMETAFILEPICT: u32 = 0x0083;
///Text display format associated with a private format. The *hMem* parameter must be a handle to
///data that can be displayed in text format in lieu of the privately formatted data.
pub const CF_DSPTEXT: u32 = 0x0081;
///A handle to an enhanced metafile (<b>HENHMETAFILE</b>).
pub const CF_ENHMETAFILE: u32 = 14;
///Start of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJFIRST: u32 = 0x0300;
///End of a range of integer values for application-defined GDI object clipboard formats.
pub const CF_GDIOBJLAST: u32 = 0x03FF;
///A handle to type <b>HDROP</b> that identifies a list of files.
pub const CF_HDROP: u32 = 15;
///The data is a handle to the locale identifier associated with text in the clipboard.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_LOCALE: u32 = 16;
///Handle to a metafile picture format as defined by the <b>METAFILEPICT</b> structure.
pub const CF_METAFILEPICT: u32 = 3;
///Text format containing characters in the OEM character set.
pub const CF_OEMTEXT: u32 = 7;
///Owner-display format.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_OWNERDISPLAY: u32 = 0x0080;
///Handle to a color palette.
///
///For details see [Standart Clipboard Formats](https://msdn.microsoft.com/en-us/library/windows/desktop/ff729168%28v=vs.85%29.aspx)
pub const CF_PALETTE: u32 = 9;
///Data for the pen extensions to the Microsoft Windows for Pen Computing.
pub const CF_PENDATA: u32 = 10;
///Start of a range of integer values for private clipboard formats.
pub const CF_PRIVATEFIRST: u32 = 0x0200;
///End of a range of integer values for private clipboard formats.
pub const CF_PRIVATELAST: u32 = 0x02FF;
///Represents audio data more complex than can be represented in a ```CF_WAVE``` standard wave format.
pub const CF_RIFF: u32 = 11;
///Microsoft Symbolic Link (SYLK) format.
pub const CF_SYLK: u32 = 4;
///ANSI text format.
pub const CF_TEXT: u32 = 1;
///Tagged-image file format.
pub const CF_TIFF: u32 = 6;
///UTF16 text format.
pub const CF_UNICODETEXT: u32 = 13;
///Represents audio data in one of the standard wave formats.
pub const CF_WAVE: u32 = 12;
|
use gio::prelude::*;
use gtk::prelude::*;
use rt_graph::{ConfigBuilder, GraphWithControls, TestDataGenerator};
use std::{
env::args,
};
fn main() {
env_logger::init();
let application =
gtk::Application::new(Some("com.github.fluffysquirrels.rt-graph.gtk-example"),
gio::ApplicationFlags::default())
.expect("Application::new failed");
application.connect_activate(|app| {
build_ui(app);
});
application.run(&args().collect::<Vec<_>>());
}
fn build_ui(application: >k::Application) {
let window = gtk::ApplicationWindowBuilder::new()
.application(application)
.title("rt-graph")
.border_width(8)
.window_position(gtk::WindowPosition::Center)
.build();
// Show the (gtk) window so we can get a gdk::window below.
window.show();
let gdk_window = window.get_window().unwrap();
let config = ConfigBuilder::default()
.data_source(TestDataGenerator::new())
.build()
.unwrap();
let mut _g = GraphWithControls::build_ui(config, &window, &gdk_window);
window.show_all();
}
|
use game_lib::bevy::prelude::*;
use std::ops::{Add, AddAssign, Sub, SubAssign};
#[derive(Clone, Copy, PartialEq, Debug, Default, Reflect)]
#[reflect(Component)]
pub struct AxisAlignedBoundingBox {
bottom_left: Vec2,
size: Vec2,
}
impl AxisAlignedBoundingBox {
pub fn new(bottom_left: Vec2, size: Vec2) -> Self {
AxisAlignedBoundingBox { bottom_left, size }
}
pub fn from_center(center: Vec2, size: Vec2) -> Self {
AxisAlignedBoundingBox::new(center - size / 2.0, size)
}
pub fn from_corners(bottom_left: Vec2, top_right: Vec2) -> Self {
AxisAlignedBoundingBox {
bottom_left,
size: top_right - bottom_left,
}
}
/// Returns the smallest AABB that contains all the given child AABBs. This
/// returns `None` only if no AABBs are given.
pub fn containing(aabbs: &[AxisAlignedBoundingBox]) -> Option<Self> {
let (bottom_left, top_right) = aabbs.iter().fold(None, |corners, cur| match corners {
None => Some((cur.bottom_left(), cur.top_right())),
Some((bottom_left, top_right)) => Some((
Vec2::min(bottom_left, cur.bottom_left()),
Vec2::max(top_right, cur.top_right()),
)),
})?;
Some(AxisAlignedBoundingBox::from_corners(bottom_left, top_right))
}
pub fn left(&self) -> f32 {
self.bottom_left[0]
}
pub fn right(&self) -> f32 {
self.bottom_left[0] + self.size[0]
}
pub fn top(&self) -> f32 {
self.bottom_left[1] + self.size[1]
}
pub fn bottom(&self) -> f32 {
self.bottom_left[1]
}
pub fn top_left(&self) -> Vec2 {
self.bottom_left + self.size * Vec2::Y
}
pub fn top_right(&self) -> Vec2 {
self.bottom_left + self.size
}
pub fn bottom_left(&self) -> Vec2 {
self.bottom_left
}
pub fn bottom_right(&self) -> Vec2 {
self.bottom_left + self.size + Vec2::X
}
pub fn center(&self) -> Vec2 {
self.bottom_left + self.size / 2.0
}
pub fn size(&self) -> Vec2 {
self.size
}
pub fn quadrants(&self) -> [AxisAlignedBoundingBox; 4] {
let bottom_left = self.bottom_left();
let quad_size = self.size() / 2.0;
[
AxisAlignedBoundingBox::new(bottom_left, quad_size),
AxisAlignedBoundingBox::new(bottom_left + Vec2::X * (quad_size[0] / 2.0), quad_size),
AxisAlignedBoundingBox::new(bottom_left + Vec2::Y * (quad_size[1] / 2.0), quad_size),
AxisAlignedBoundingBox::new(bottom_left + quad_size, quad_size),
]
}
pub fn contains(&self, other: &AxisAlignedBoundingBox) -> bool {
self.left() <= other.left()
&& self.right() >= other.right()
&& self.top() >= other.top()
&& self.bottom() <= other.bottom()
}
pub fn contains_point(&self, point: Vec2) -> bool {
point[0] >= self.left()
&& point[0] < self.right()
&& point[1] < self.top()
&& point[0] >= self.bottom()
}
pub fn intersects(&self, other: &AxisAlignedBoundingBox) -> bool {
self.left() < other.right()
&& self.right() > other.left()
&& self.top() > other.bottom()
&& self.bottom() < other.top()
}
pub fn intersection(
&self,
other: &AxisAlignedBoundingBox,
epsilon: f32,
) -> Option<AxisAlignedBoundingBox> {
let left = self.left().max(other.left());
let right = self.right().min(other.right());
let top = self.top().max(other.top());
let bottom = self.bottom().min(other.bottom());
let width = right - left;
let height = top - bottom;
if width > epsilon && height > epsilon {
Some(AxisAlignedBoundingBox::new(
Vec2::new(left, bottom),
Vec2::new(width, height),
))
} else {
None
}
}
}
impl Add<Vec2> for AxisAlignedBoundingBox {
type Output = Self;
fn add(mut self, rhs: Vec2) -> Self::Output {
self += rhs;
self
}
}
impl AddAssign<Vec2> for AxisAlignedBoundingBox {
fn add_assign(&mut self, rhs: Vec2) {
self.bottom_left += rhs;
}
}
impl Sub<Vec2> for AxisAlignedBoundingBox {
type Output = Self;
fn sub(mut self, rhs: Vec2) -> Self::Output {
self -= rhs;
self
}
}
impl SubAssign<Vec2> for AxisAlignedBoundingBox {
fn sub_assign(&mut self, rhs: Vec2) {
self.bottom_left -= rhs;
}
}
|
#![allow(dead_code)]
use near_sdk::{serde_json::json, AccountId, PendingContractTx};
use near_sdk_sim::*;
use oysterpack_near_stake_token::{
domain::{Gas, YoctoNear},
interface::{Config, ContractBalances},
};
pub struct FinancialsClient {
contract_account_id: AccountId,
}
impl FinancialsClient {
pub fn new(contract_account_id: &str) -> Self {
Self {
contract_account_id: contract_account_id.to_string(),
}
}
pub fn balances(&self, user: &UserAccount) -> ContractBalances {
let result = user.view(PendingContractTx::new(
&self.contract_account_id,
"balances",
json!({}),
true,
));
result.unwrap_json()
}
pub fn deposit_earnings(
&self,
user: &UserAccount,
deposit: YoctoNear,
gas: Gas,
) -> ContractBalances {
let result = user.call(
PendingContractTx::new(
&self.contract_account_id,
"deposit_earnings",
json!({}),
false,
),
deposit.value(),
gas.value(),
);
result.unwrap_json()
}
}
|
use procon_reader::ProconReader;
fn main() {
let stdin = std::io::stdin();
let mut rd = ProconReader::new(stdin.lock());
let n: usize = rd.get();
let t: Vec<usize> = rd.get_vec(n);
macro_rules! chmin {
($a: expr, $b: expr) => {
$a = std::cmp::min($a, $b);
};
}
let inf = std::usize::MAX / 2;
let mut dp = vec![inf; 1_000_00 + 1];
dp[0] = 0;
for &t in &t {
let mut nxt = vec![inf; dp.len()];
for s in 0..dp.len() {
if s + t < dp.len() {
chmin!(nxt[s + t], dp[s]);
}
chmin!(nxt[s], dp[s] + t);
}
dp = nxt;
}
let mut ans = inf;
for i in 0..dp.len() {
chmin!(ans, i.max(dp[i]));
}
println!("{}", ans);
}
|
use game_lib::bevy::{
prelude::*,
reflect::Reflect,
render::camera::{CameraProjection, DepthCalculation, WindowOrigin},
};
#[derive(Debug, Clone, Reflect)]
#[reflect(Component)]
pub struct ScaledOrthographicProjection {
/// Automatically calculated from zoom.
pub left: f32,
/// Automatically calculated from zoom.
pub right: f32,
/// Automatically calculated from zoom.
pub top: f32,
/// Automatically calculated from zoom.
pub bottom: f32,
pub near: f32,
pub far: f32,
/// The origin of the camera with respect to window size.
pub window_origin: WindowOrigin,
/// The factor each object's width and height are multiplied by.
/// This value cannot be zero, otherwise rendering will panic.
pub zoom: f32,
}
impl CameraProjection for ScaledOrthographicProjection {
fn get_projection_matrix(&self) -> Mat4 {
Mat4::orthographic_rh(
self.left,
self.right,
self.bottom,
self.top,
self.near,
self.far,
)
}
fn update(&mut self, width: f32, height: f32) {
match self.window_origin {
WindowOrigin::Center => {
let half_width = width / (2.0 * self.zoom);
let half_height = height / (2.0 * self.zoom);
self.left = -half_width;
self.right = half_width;
self.top = half_height;
self.bottom = -half_height;
}
WindowOrigin::BottomLeft => {
self.left = 0.0;
self.right = width / self.zoom;
self.top = height / self.zoom;
self.bottom = 0.0;
}
}
}
fn depth_calculation(&self) -> DepthCalculation {
DepthCalculation::ZDifference
}
}
impl Default for ScaledOrthographicProjection {
fn default() -> Self {
ScaledOrthographicProjection {
left: 0.0,
right: 0.0,
bottom: 0.0,
top: 0.0,
near: 0.0,
far: 1000.0,
window_origin: WindowOrigin::Center,
zoom: 1.0,
}
}
}
|
mod blog;
mod blog_clusters;
mod hlf_parser;
mod shared;
/**
* Auto matically convert raw markdown blogs to my serveral blog web pages
*/
mod tag;
mod template_blog;
mod template_cluster;
mod template_homepage;
use blog_clusters::BlogClusters;
use shared::HTMLTemplate;
use template_blog::BlogTemplate;
use template_cluster::ClusterTemplate;
use template_homepage::HomepageTemplate;
// for directory iteration, template read, result write
use dotenv;
use std::env;
use std::fs;
fn get_blog_mds(blog_path: &str) -> Vec<(String, String)> {
let blog_subdirs =
fs::read_dir(blog_path).expect(&format!("read blog directory: {} failed.", blog_path));
let blog_markdown_names: Vec<String> = blog_subdirs
.map(|x| x.unwrap().file_name().into_string().unwrap())
.collect();
let blog_markdown_paths: Vec<String> = blog_markdown_names
.iter()
.map(|x| blog_path.to_string() + x)
.collect();
// Return filenames zipped with contents
let blogs: Vec<(String, String)> = blog_markdown_names
.iter()
.cloned()
.map(|mut x| {
// length -3 to remove ".md"
x.truncate(x.len() - 3);
x
})
.zip(
blog_markdown_paths
.iter()
.map(|x| fs::read_to_string(x).unwrap()),
)
.collect();
blogs
}
fn main() {
dotenv::dotenv().ok();
let tags_path =
env::var("TAGS_PATH").expect("Please specify tags path in environment variable.");
let homepage_template_path = env::var("TEMPLATE_HOMEPAGE_PATH")
.expect("Please specify homepage template path in environment variable.");
let blog_template_path = env::var("TEMPLATE_BLOG_PATH")
.expect("Please specify blog template path in environment variable.");
let cluster_template_path = env::var("TEMPLATE_CLUSTER_PATH")
.expect("Please specify cluster template path in environment variable.");
let output_path =
env::var("OUTPUT_PATH").expect("Please specify output path in environment variable.");
let blog_path =
env::var("BLOG_PATH").expect("Please specify blog path in environment variable.");
let homepage_template_raw =
fs::read_to_string(&homepage_template_path).expect("homepage template not found!");
let blog_template_raw =
fs::read_to_string(&blog_template_path).expect("blog template not found!");
let cluster_template_raw =
fs::read_to_string(&cluster_template_path).expect("cluster template not found!");
let homepage_template: HomepageTemplate = HTMLTemplate::load(&homepage_template_raw).unwrap();
let blog_template: BlogTemplate = HTMLTemplate::load(&blog_template_raw).unwrap();
let cluster_template: ClusterTemplate = HTMLTemplate::load(&cluster_template_raw).unwrap();
let tags: String = fs::read_to_string(&tags_path).expect("failed to read tags.");
let blog_mds: Vec<(String, String)> = get_blog_mds(&blog_path);
let mut blog_clusters = BlogClusters::new();
blog_clusters.add_tags(&tags);
blog_clusters.add_blogs(&blog_mds);
let blog_html_result: Vec<(String, String)> = blog_template.fill(&blog_clusters);
let cluster_html_result: Vec<(String, String)> = cluster_template.fill(&blog_clusters);
let homepage_html_result: Vec<(String, String)> = homepage_template.fill(&blog_clusters);
assert_eq!(cluster_html_result.len(), 1);
assert_eq!(homepage_html_result.len(), 1);
match fs::create_dir_all(&output_path) {
Ok(_) => println!("Create direcotry \"{}\" if not exist.", &output_path),
Err(err) => println!("Create directory failed: {}.", err),
}
for (file_name, file_content) in blog_html_result {
let path = output_path.clone() + &file_name;
match fs::write(&path, file_content) {
Ok(_) => println!("Output to \"{}\" ok.", &path),
Err(err) => panic!("Write to \"{}\" failed: {}.", &path, err),
}
}
for (file_name, file_content) in homepage_html_result {
let path = output_path.clone() + &file_name;
match fs::write(&path, file_content) {
Ok(_) => println!("Output to \"{}\" ok.", &path),
Err(err) => panic!("Write to \"{}\" failed: {}.", &path, err),
}
}
}
|
pub struct ProconReader<R: std::io::Read> {
reader: R,
}
impl<R: std::io::Read> ProconReader<R> {
pub fn new(reader: R) -> Self {
Self { reader }
}
pub fn get<T: std::str::FromStr>(&mut self) -> T {
use std::io::Read;
let buf = self
.reader
.by_ref()
.bytes()
.map(|b| b.unwrap())
.skip_while(|&byte| byte == b' ' || byte == b'\n' || byte == b'\r')
.take_while(|&byte| byte != b' ' && byte != b'\n' && byte != b'\r')
.collect::<Vec<_>>();
std::str::from_utf8(&buf)
.unwrap()
.parse()
.ok()
.expect("Parse Error.")
}
}
#[allow(dead_code)]
mod mint {
use std::ops::{Add, BitAnd, Div, Mul, Rem, Shr, Sub};
#[derive(Copy, Clone)]
pub struct Mint<T> {
x: T,
mo: T,
}
impl<T> Mint<T>
where
T: Copy,
{
pub fn new(x: T, mo: T) -> Mint<T> {
Mint { x, mo }
}
}
impl<T> Mint<T>
where
T: Copy,
{
pub fn val(&self) -> T {
self.x
}
pub fn mo(&self) -> T {
self.mo
}
}
impl<T> Add<T> for Mint<T>
where
T: Copy,
T: Add<Output = T>,
T: Rem<Output = T>,
{
type Output = Mint<T>;
fn add(self, rhs: T) -> Mint<T> {
Mint::new((self.val() + rhs % self.mo()) % self.mo(), self.mo())
}
}
impl<T> Add<Mint<T>> for Mint<T>
where
T: Copy,
Mint<T>: Add<T, Output = Mint<T>>,
{
type Output = Mint<T>;
fn add(self, rhs: Mint<T>) -> Mint<T> {
self + rhs.val()
}
}
impl<T> Sub<T> for Mint<T>
where
T: Copy,
T: Add<Output = T>,
T: Sub<Output = T>,
T: Rem<Output = T>,
{
type Output = Mint<T>;
fn sub(self, rhs: T) -> Mint<T> {
Mint::new(
(self.val() + self.mo() - rhs % self.mo()) % self.mo(),
self.mo(),
)
}
}
impl<T> Sub<Mint<T>> for Mint<T>
where
T: Copy,
Mint<T>: Sub<T, Output = Mint<T>>,
{
type Output = Mint<T>;
fn sub(self, rhs: Mint<T>) -> Mint<T> {
self - rhs.val()
}
}
impl<T> Mul<T> for Mint<T>
where
T: Copy,
T: Mul<Output = T>,
T: Rem<Output = T>,
{
type Output = Mint<T>;
fn mul(self, rhs: T) -> Mint<T> {
Mint::new((self.val() * rhs % self.mo()) % self.mo(), self.mo())
}
}
impl<T> Mul<Mint<T>> for Mint<T>
where
T: Copy,
Mint<T>: Mul<T, Output = Mint<T>>,
{
type Output = Mint<T>;
fn mul(self, rhs: Mint<T>) -> Mint<T> {
self * rhs.val()
}
}
impl<T> Mint<T>
where
T: Copy,
T: Sub<Output = T>,
T: Div<Output = T>,
T: PartialOrd,
T: PartialEq,
T: BitAnd<Output = T>,
T: Shr<Output = T>,
Mint<T>: Mul<Output = Mint<T>>,
{
pub fn pow(self, y: T) -> Mint<T> {
let one = self.mo() / self.mo();
let zero = self.mo() - self.mo();
let mut res = Mint::one(self.mo());
let mut base = self;
let mut exp = y;
while exp > zero {
if (exp & one) == one {
res = res * base;
}
base = base * base;
exp = exp >> one;
}
res
}
}
impl<T> Div<T> for Mint<T>
where
T: Copy,
T: Sub<Output = T>,
T: Div<Output = T>,
T: PartialOrd,
T: PartialEq,
T: BitAnd<Output = T>,
T: Shr<Output = T>,
Mint<T>: Mul<Output = Mint<T>>,
{
type Output = Mint<T>;
fn div(self, rhs: T) -> Mint<T> {
let one = self.mo() / self.mo();
self * Mint::new(rhs, self.mo()).pow(self.mo() - one - one)
}
}
impl<T> Div<Mint<T>> for Mint<T>
where
T: Copy,
Mint<T>: Div<T, Output = Mint<T>>,
{
type Output = Mint<T>;
fn div(self, rhs: Mint<T>) -> Mint<T> {
self / rhs.val()
}
}
impl<T> Mint<T>
where
T: Copy,
T: Div<Output = T>,
Mint<T>: Div<Output = Mint<T>>,
{
pub fn inv(self) -> Mint<T> {
Mint::one(self.mo()) / self
}
}
impl<T> std::fmt::Display for Mint<T>
where
T: Copy + std::fmt::Display,
{
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.val())
}
}
impl<T> Mint<T>
where
T: Copy,
T: Sub<Output = T>,
{
pub fn zero(mo: T) -> Mint<T> {
Mint { x: mo - mo, mo }
}
}
impl<T> Mint<T>
where
T: Copy,
T: Div<Output = T>,
{
pub fn one(mo: T) -> Mint<T> {
Mint { x: mo / mo, mo }
}
}
}
use mint::Mint;
macro_rules! add {
($a:expr, $b:expr) => {
$a = $a + $b;
};
}
fn main() {
let stdin = std::io::stdin();
let mut rd = ProconReader::new(stdin.lock());
let s: usize = rd.get();
let mo = 1_000_000_000 + 7;
let mut dp = vec![vec![Mint::zero(mo); s + 2]; s + 1];
dp[0][0] = Mint::one(mo);
for i in 0..s {
for j in 0..=s {
if j + 3 <= s {
// println!("{:?}", (i, j));
add!(dp[i + 1][j + 3], dp[i][j]);
add!(dp[i + 1][s + 1], Mint::new(mo - dp[i][j].val(), mo));
}
}
// println!(
// "{:?}",
// dp[i + 1].iter().map(|x| x.val()).collect::<Vec<_>>()
// );
for j in 0..=s {
add!(dp[i + 1][j + 1], dp[i + 1][j]);
}
}
let mut ans = Mint::zero(mo);
for i in 1..=s {
add!(ans, dp[i][s]);
}
println!("{}", ans);
}
|
//! A map backed by contract storage.
use std::{convert::TryInto, marker::PhantomData};
use oasis_contract_sdk::{storage::Store, types::address::Address};
use crate::cell::Cell;
/// A map backed by contract storage.
pub struct Map<'key, K, V> {
/// Unique map identifier.
key: &'key [u8],
_key: PhantomData<K>,
_value: PhantomData<V>,
}
impl<'key, K, V> Map<'key, K, V> {
/// Create a new map instance.
pub const fn new(key: &'key [u8]) -> Self {
Self {
key,
_key: PhantomData,
_value: PhantomData,
}
}
}
impl<'key, K, V> Map<'key, K, V>
where
K: MapKey,
V: cbor::Encode + cbor::Decode,
{
fn key(&self, key: K) -> Vec<u8> {
let raw_key = key.key();
encode_length_prefixed_path(
self.key,
&raw_key[..raw_key.len() - 1],
raw_key[raw_key.len() - 1],
)
}
/// Lookup a given key.
pub fn get(&self, store: &dyn Store, key: K) -> Option<V> {
Cell::new(&self.key(key)).get(store)
}
/// Insert a given key/value pair.
pub fn insert(&self, store: &mut dyn Store, key: K, value: V) {
Cell::new(&self.key(key)).set(store, value);
}
/// Remove a given key.
pub fn remove(&self, store: &mut dyn Store, key: K) {
Cell::<V>::new(&self.key(key)).clear(store);
}
}
/// A trait for types which can be used as map keys.
pub trait MapKey {
/// Return the composite key.
fn key(&self) -> Vec<&[u8]>;
}
impl<const N: usize> MapKey for [u8; N] {
fn key(&self) -> Vec<&[u8]> {
vec![self]
}
}
impl MapKey for &[u8] {
fn key(&self) -> Vec<&[u8]> {
vec![self]
}
}
impl MapKey for &str {
fn key(&self) -> Vec<&[u8]> {
vec![self.as_bytes()]
}
}
impl MapKey for Vec<u8> {
fn key(&self) -> Vec<&[u8]> {
vec![self]
}
}
impl MapKey for String {
fn key(&self) -> Vec<&[u8]> {
vec![self.as_bytes()]
}
}
impl<T, U> MapKey for (T, U)
where
T: MapKey,
U: MapKey,
{
fn key(&self) -> Vec<&[u8]> {
let mut key = self.0.key();
key.extend(self.1.key());
key
}
}
impl<T, U, V> MapKey for (T, U, V)
where
T: MapKey,
U: MapKey,
V: MapKey,
{
fn key(&self) -> Vec<&[u8]> {
let mut key = self.0.key();
key.extend(self.1.key());
key.extend(self.2.key());
key
}
}
impl MapKey for Address {
fn key(&self) -> Vec<&[u8]> {
vec![self.as_ref()]
}
}
/// A trait representing an integer that can be encoded into big-endian bytes.
pub trait Integer {
/// Type of the encoded representation.
type Encoded: AsRef<[u8]>;
/// Return the memory representation of this integer as a byte array in big-endian byte order.
fn to_be_bytes(self) -> Self::Encoded;
}
macro_rules! impl_integer_for_primitive {
($ty:ty) => {
impl Integer for $ty {
type Encoded = [u8; std::mem::size_of::<$ty>()];
fn to_be_bytes(self) -> Self::Encoded {
<$ty>::to_be_bytes(self)
}
}
};
}
impl_integer_for_primitive!(u8);
impl_integer_for_primitive!(u16);
impl_integer_for_primitive!(u32);
impl_integer_for_primitive!(u64);
impl_integer_for_primitive!(u128);
impl_integer_for_primitive!(i8);
impl_integer_for_primitive!(i16);
impl_integer_for_primitive!(i32);
impl_integer_for_primitive!(i64);
impl_integer_for_primitive!(i128);
/// An integer in big-endian representation.
pub struct Int<I: Integer> {
encoded: I::Encoded,
_type: PhantomData<I>,
}
impl<I: Integer> Int<I> {
/// Create a new integer in big-endian representation.
pub fn new(v: I) -> Self {
Self {
encoded: v.to_be_bytes(),
_type: PhantomData,
}
}
}
impl<I: Integer> From<I> for Int<I> {
fn from(v: I) -> Self {
Self::new(v)
}
}
impl<I: Integer> MapKey for Int<I> {
fn key(&self) -> Vec<&[u8]> {
vec![self.encoded.as_ref()]
}
}
/// Encodes the given components as a length-prefixed path.
fn encode_length_prefixed_path(front: &[u8], middle: &[&[u8]], back: &[u8]) -> Vec<u8> {
let size = middle.iter().fold(0, |acc, k| acc + k.len() + 1);
let mut output = Vec::with_capacity(front.len() + size + back.len());
// Front is not length-prefixed.
output.extend_from_slice(front);
// Middle keys are length-prefixed.
for key in middle {
output.extend_from_slice(&encode_length(key));
output.extend_from_slice(key);
}
// Back is not length-prefixed.
output.extend_from_slice(back);
output
}
/// Encode the length of a storage key.
///
/// # Panics
///
/// This function will panic if the key length is greater than 255 bytes.
fn encode_length(key: &[u8]) -> [u8; 1] {
[key.len().try_into().expect("key length greater than 255")]
}
#[cfg(test)]
mod test {
use oasis_contract_sdk::testing::MockStore;
use super::*;
#[test]
fn test_map_basic() {
let mut store = MockStore::new();
let map: Map<&str, u64> = Map::new(b"test");
assert_eq!(map.get(&store, "foo"), None);
map.insert(&mut store, "foo", 42);
assert_eq!(map.get(&store, "foo"), Some(42));
let map: Map<Int<u64>, String> = Map::new(b"test2");
assert_eq!(map.get(&store, 42.into()), None);
map.insert(&mut store, 42.into(), "hello".to_string());
assert_eq!(map.get(&store, 42.into()), Some("hello".to_string()));
map.remove(&mut store, 42.into());
assert_eq!(map.get(&store, 42.into()), None);
}
#[test]
fn test_map_composite() {
let mut store = MockStore::new();
let map: Map<(&str, &str), u64> = Map::new(b"test");
assert_eq!(map.get(&store, ("foo", "bar")), None);
map.insert(&mut store, ("foo", "bar"), 42);
assert_eq!(map.get(&store, ("foo", "bar")), Some(42));
// Make sure we have proper key separation due to length-prefixing.
assert_eq!(map.get(&store, ("foob", "ar")), None);
map.remove(&mut store, ("foo", "bar"));
assert_eq!(map.get(&store, ("foo", "bar")), None);
}
#[test]
fn test_encode_length() {
assert_eq!(encode_length(b"foo"), [0x03]);
}
#[test]
#[should_panic]
fn test_encode_length_too_long() {
let v = vec![0x00; 260];
encode_length(&v);
}
#[test]
fn test_encode_length_prefixed_path() {
let four_five_six = vec![4, 5, 6];
let tcs = vec![
(vec![], vec![], vec![], vec![]),
(vec![1, 2, 3], vec![], vec![], vec![1, 2, 3]),
(vec![1, 2, 3], vec![], vec![4, 5, 6], vec![1, 2, 3, 4, 5, 6]),
(
vec![1, 2, 3],
vec![&four_five_six[..]],
vec![7, 8, 9],
vec![1, 2, 3, 3, 4, 5, 6, 7, 8, 9],
),
(
vec![1, 2, 3],
vec![&four_five_six[..], &four_five_six[..]],
vec![7, 8, 9],
vec![1, 2, 3, 3, 4, 5, 6, 3, 4, 5, 6, 7, 8, 9],
),
];
for (front, middle, back, expected) in tcs {
assert_eq!(
encode_length_prefixed_path(&front, &middle, &back),
expected
);
}
}
}
|
use aes::Aes256;
use block_modes::Cbc;
use block_modes::{BlockMode, BlockModeError};
use rand::Rng;
use block_modes::block_padding::Pkcs7;
use sha2::{Sha256, Digest};
type Aes256Cbc = Cbc<Aes256, Pkcs7>;
/// This function takes in a password and data, encrypting using AES256. Returns (ciphertext, iv).
pub fn encrypt(password: &String, plaintext: &String) -> (Vec<u8>, Vec<u8>) {
let password_copy = password.clone();
let plaintext_copy = plaintext.clone();
let mut rng = rand::thread_rng();
let mut hasher = Sha256::new();
let mut iv = Vec::new();
// Initialization vector must be 16 bytes long, randomly generated every time. It is not a secret.
for _i in 0..16 {
let new_gen: u8 = rng.gen();
iv.push(new_gen);
}
// Put the password into the hasher
hasher.update(password_copy.as_bytes());
// Get the hashed password
let hashed_key = hasher.finalize();
// Create a new cipher using the hashed password and the initialization vector
let cipher = Aes256Cbc::new_var(&hashed_key[..], &iv).unwrap();
// Encrypt
let ciphertext = cipher.encrypt_vec(plaintext_copy.as_bytes());
return (ciphertext, iv);
}
/// This function takes in a password, ciphertext, and iv, decrypting using AES256. Returns plaintext.
pub fn decrypt(password: &String, ciphertext: &Vec<u8>, iv: &Vec<u8>) -> Result<String, BlockModeError> {
let password_copy = password.clone();
let ciphertext_copy = ciphertext.clone();
let iv_copy = iv.clone();
let mut hasher = Sha256::new();
hasher.update(password_copy.as_bytes());
// Get the hashed password
let hashed_key = hasher.finalize();
// Create a new cipher using the hashed password and the initialization vector
let cipher = Aes256Cbc::new_var(&hashed_key[..], &iv_copy[..]).unwrap();
// Decrypt
let plaintext = cipher.decrypt_vec(&ciphertext_copy[..])?;
return Ok(String::from_utf8(plaintext).unwrap());
}
#[cfg(test)]
mod tests{
use super::{encrypt, decrypt};
/// Checks if the same message encrypted twice with the same password does not give the same outcome/
#[test]
fn test_encrypt_twice() {
let password = "abcd".to_string();
let plaintext = "this is a plaintext!".to_string();
let tuple1 = encrypt(&password, &plaintext);
let tuple2 = encrypt(&password, &plaintext);
assert_ne!(tuple1.0, tuple2.0);
}
/// Checks if encrypting and decrypting returns the same plaintext.
#[test]
fn test_encrypt_decrypt() {
let password = "abcd".to_string();
let plaintext = "this is a plaintext!".to_string();
let tuple = encrypt(&password, &plaintext);
let decrypted = decrypt(&password, &tuple.0, &tuple.1).unwrap();
assert_eq!(plaintext, decrypted);
}
/// Checks if a corrupted ciphertext throws an error.
#[test]
fn test_corrupted_decrypt() {
let password = "abcd".to_string();
let plaintext = "this is a plaintext!".to_string();
let mut tuple = encrypt(&password, &plaintext);
let vec_len = tuple.0.len()-1;
tuple.0[vec_len] = b'1';
let decrypted = decrypt(&password, &tuple.0, &tuple.1);
// Error should be thrown, since there is an invalid byte.
match decrypted {
Ok(_) => assert!(false),
Err(_) => assert!(true),
}
}
} |
use liblumen_alloc::erts::exception::InternalResult;
use liblumen_alloc::erts::term::prelude::*;
use liblumen_alloc::erts::Process;
use super::f64;
pub fn decode<'a>(process: &Process, bytes: &'a [u8]) -> InternalResult<(Term, &'a [u8])> {
let (f, after_f_bytes) = f64::decode(bytes)?;
let float = process.float(f);
Ok((float, after_f_bytes))
}
|
//! Reference following avoids reference expressions by replacing their usages
//! with original referenced value.
//!
//! Here's a before-and-after example:
//!
//! ```mir
//! $0 = Foo | $0 = Foo
//! $1 = $0 | $1 = $0
//! $2 = call ... with $1 | $2 = call ... with $0
//! ```
//!
//! This is useful for [constant folding], which tests for specific expression
//! types. For example, to constant-fold a `builtinIntAdd', it tests whether
//! both arguments are an `Expression::Int`. An `Expression::Reference` prevents
//! that optimization.
//!
//! [constant folding]: super::constant_folding
use super::current_expression::{Context, CurrentExpression};
use crate::mir::{Body, Expression};
pub fn follow_references(context: &mut Context, expression: &mut CurrentExpression) {
expression.replace_id_references(&mut |id| {
if context.visible.contains(*id) && let Expression::Reference(referenced) = context.visible.get(*id) {
*id = *referenced;
}
});
}
pub fn remove_redundant_return_references(body: &mut Body) {
while let [.., (second_last_id, _), (_, Expression::Reference(referenced))] = &body.expressions[..]
&& referenced == second_last_id {
body.expressions.pop();
}
}
|
//! Implementation of Finite State Automata in both Nondeterministic and Deterministic forms,
//! together with a set of conversions, processing, analysis, and visualization utilities.
#![warn(missing_copy_implementations)]
#![warn(missing_debug_implementations)]
#![warn(trivial_casts)]
#![warn(trivial_numeric_casts)]
#![warn(unsafe_code)]
#![warn(unused_import_braces)]
#![warn(unused_qualifications)]
#![warn(missing_docs)]
#![feature(test)]
pub mod alphabet;
pub mod data;
pub mod dfa;
pub mod nfa;
pub mod pattern;
pub mod state;
pub mod symbol;
pub use dfa::Dfa;
pub use nfa::Nfa;
pub use pattern::*;
pub use symbol::*;
pub use enso_prelude as prelude;
|
extern crate jlib;
use jlib::api::ipfs::hash::only_hash;
use std::fs::File;
use std::io::prelude::*;
fn big_file_hash() {
// let mut f = File::open("/mnt/c/Users/zTgx/Desktop/github.com.c/ipfs/1.png").unwrap();
let mut f = File::open("/mnt/c/Users/zTgx/Desktop/github.com.c/ipfs/1.jpg").unwrap();
let mut buf = Vec::new();
f.read_to_end(&mut buf).unwrap();
println!("buf size: {:?}", buf.len());
let target = "QmdSNzh5fsfUTz66adXkDFVFFmDGpPSvziEp7u8bZcxYAr".to_owned();
if let Some(hash) = only_hash( &buf ) {
println!("big file hash: {}", hash);
assert_eq!(hash, target);
} else {
println!("ipfs hash none");
}
}
fn little_file_hash() {
let target = "Qmf412jQZiuVUtdgnB36FXFX7xg5V6KEbSJ4dpQuhkLyfD".to_owned();
let digest = "hello world".as_bytes().to_vec();
let hash = only_hash( &digest ).unwrap();
assert_eq!(hash, target);
}
enum Case {
NoneFile,
BigFile,
LittleFile,
}
// ---------------------------------------------------------------------------------------------------------
//
// ipfs 主方法
//
// ---------------------------------------------------------------------------------------------------------
fn main() {
let case = Case::BigFile;
let case = Case::LittleFile;
match case {
Case::NoneFile => {
},
Case::BigFile => {
big_file_hash();
},
Case::LittleFile => {
little_file_hash()
}
}
} |
// Copyright 2017 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//! Bindings for the Zircon fdio library
#[allow(bad_style)]
pub mod fdio_sys;
use {
::bitflags::bitflags,
fidl_fuchsia_device::ControllerSynchronousProxy,
fuchsia_zircon::{
self as zx,
prelude::*,
sys::{self, zx_handle_t, zx_status_t},
},
std::{
ffi::{self, CStr, CString},
fs::File,
marker::PhantomData,
os::{
raw,
unix::{
ffi::OsStrExt,
io::{AsRawFd, FromRawFd, IntoRawFd},
},
},
path::Path,
ptr,
},
};
/// Connects a channel to a named service.
pub fn service_connect(service_path: &str, channel: zx::Channel) -> Result<(), zx::Status> {
let c_service_path = CString::new(service_path).map_err(|_| zx::Status::INVALID_ARGS)?;
// TODO(raggi): this should be convered to an asynchronous FDIO
// client protocol as soon as that is available (post fidl2) as this
// call can block indefinitely.
//
// fdio_service connect takes a *const c_char service path and a channel.
// On success, the channel is connected, and on failure, it is closed.
// In either case, we do not need to clean up the channel so we use
// `into_raw` so that Rust forgets about it.
zx::ok(unsafe { fdio_sys::fdio_service_connect(c_service_path.as_ptr(), channel.into_raw()) })
}
/// Connects a channel to a named service relative to a directory `dir`.
/// `dir` must be a directory protocol channel.
pub fn service_connect_at(
dir: &zx::Channel,
service_path: &str,
channel: zx::Channel,
) -> Result<(), zx::Status> {
let c_service_path = CString::new(service_path).map_err(|_| zx::Status::INVALID_ARGS)?;
// TODO(raggi): this should be convered to an asynchronous FDIO
// client protocol as soon as that is available (post fidl2) as this
// call can block indefinitely.
//
// fdio_service_connect_at takes a directory handle,
// a *const c_char service path, and a channel to connect.
// The directory handle is never consumed, so we borrow the raw handle.
// On success, the channel is connected, and on failure, it is closed.
// In either case, we do not need to clean up the channel so we use
// `into_raw` so that Rust forgets about it.
zx::ok(unsafe {
fdio_sys::fdio_service_connect_at(
dir.raw_handle(),
c_service_path.as_ptr(),
channel.into_raw(),
)
})
}
/// Opens the remote object at the given `path` with the given `flags` asynchronously.
/// ('asynchronous' here is refering to fuchsia.io.Directory.Open not having a return value).
///
/// `flags` is a bit field of |fuchsia.io.OPEN_*| options.
///
/// Wraps fdio_open.
pub fn open(path: &str, flags: u32, channel: zx::Channel) -> Result<(), zx::Status> {
let c_path = CString::new(path).map_err(|_| zx::Status::INVALID_ARGS)?;
// fdio_open_at takes a directory handle, a *const c_char service path,
// flags, and a channel to connect.
// The directory handle is never consumed, so we borrow the raw handle.
// On success, the channel is connected, and on failure, it is closed.
// In either case, we do not need to clean up the channel so we use
// `into_raw` so that Rust forgets about it.
zx::ok(unsafe { fdio_sys::fdio_open(c_path.as_ptr(), flags, channel.into_raw()) })
}
/// Opens the remote object at the given `path` relative to the given `dir` with the given `flags`
/// asynchronously. ('asynchronous' here is refering to fuchsia.io.Directory.Open not having a
/// return value).
///
/// `flags` is a bit field of |fuchsia.io.OPEN_*| options. `dir` must be a directory protocol
/// channel.
///
/// Wraps fdio_open_at.
pub fn open_at(
dir: &zx::Channel,
path: &str,
flags: u32,
channel: zx::Channel,
) -> Result<(), zx::Status> {
let c_path = CString::new(path).map_err(|_| zx::Status::INVALID_ARGS)?;
// fdio_open_at takes a directory handle, a *const c_char service path,
// flags, and a channel to connect.
// The directory handle is never consumed, so we borrow the raw handle.
// On success, the channel is connected, and on failure, it is closed.
// In either case, we do not need to clean up the channel so we use
// `into_raw` so that Rust forgets about it.
zx::ok(unsafe {
fdio_sys::fdio_open_at(dir.raw_handle(), c_path.as_ptr(), flags, channel.into_raw())
})
}
/// Opens the remote object at the given `path` with the given `flags` synchronously, and on
/// success, binds that channel to a file descriptor and returns it.
///
/// `flags` is a bit field of |fuchsia.io.OPEN_*| options.
///
/// Wraps fdio_open_fd.
pub fn open_fd(path: &str, flags: u32) -> Result<File, zx::Status> {
let c_path = CString::new(path).map_err(|_| zx::Status::INVALID_ARGS)?;
// fdio_open_fd takes a *const c_char service path, flags, and on success returns the opened
// file descriptor through the provided pointer arguument.
let mut raw_fd = -1;
unsafe {
let status = fdio_sys::fdio_open_fd(c_path.as_ptr(), flags, &mut raw_fd);
zx::Status::ok(status)?;
Ok(File::from_raw_fd(raw_fd))
}
}
/// Opens the remote object at the given `path` relative to the given `dir` with the given `flags`
/// synchronously, and on success, binds that channel to a file descriptor and returns it.
///
/// `flags` is a bit field of |fuchsia.io.OPEN_*| options. `dir` must be backed by a directory
/// protocol channel (even though it is wrapped in a std::fs::File).
///
/// Wraps fdio_open_fd_at.
pub fn open_fd_at(dir: &File, path: &str, flags: u32) -> Result<File, zx::Status> {
let c_path = CString::new(path).map_err(|_| zx::Status::INVALID_ARGS)?;
// fdio_open_fd_at takes a directory file descriptor, a *const c_char service path,
// flags, and on success returns the opened file descriptor through the provided pointer
// arguument.
// The directory file descriptor is never consumed, so we borrow the raw handle.
let dir_fd = dir.as_raw_fd();
let mut raw_fd = -1;
unsafe {
let status = fdio_sys::fdio_open_fd_at(dir_fd, c_path.as_ptr(), flags, &mut raw_fd);
zx::Status::ok(status)?;
Ok(File::from_raw_fd(raw_fd))
}
}
pub fn transfer_fd(file: std::fs::File) -> Result<zx::Handle, zx::Status> {
unsafe {
let mut fd_handle = zx::sys::ZX_HANDLE_INVALID;
let status = fdio_sys::fdio_fd_transfer(
file.into_raw_fd(),
&mut fd_handle as *mut zx::sys::zx_handle_t,
);
if status != zx::sys::ZX_OK {
return Err(zx::Status::from_raw(status));
}
Ok(zx::Handle::from_raw(fd_handle))
}
}
/// Create a open file descriptor from a Handle.
///
/// Afterward, the handle is owned by fdio, and will close with the File.
/// See `transfer_fd` for a way to get it back.
pub fn create_fd(handle: zx::Handle) -> Result<File, zx::Status> {
unsafe {
let mut raw_fd = -1;
let status = fdio_sys::fdio_fd_create(handle.into_raw(), &mut raw_fd);
zx::Status::ok(status)?;
Ok(File::from_raw_fd(raw_fd))
}
}
/// Open a new connection to `file` by sending a request to open
/// a new connection to the sever.
pub fn clone_channel(file: &std::fs::File) -> Result<zx::Channel, zx::Status> {
unsafe {
// First, we must open a new connection to the handle, since
// we must return a newly owned copy.
let fdio = fdio_sys::fdio_unsafe_fd_to_io(file.as_raw_fd());
let unowned_handle = fdio_sys::fdio_unsafe_borrow_channel(fdio);
let handle = fdio_sys::fdio_service_clone(unowned_handle);
fdio_sys::fdio_unsafe_release(fdio);
match handle {
zx::sys::ZX_HANDLE_INVALID => Err(zx::Status::NOT_SUPPORTED),
_ => Ok(zx::Channel::from(zx::Handle::from_raw(handle))),
}
}
}
/// Retrieves the topological path for a device node.
pub fn device_get_topo_path(dev: &File) -> Result<String, zx::Status> {
let channel = clone_channel(dev)?;
let mut interface = ControllerSynchronousProxy::new(channel);
let (status, topo) = interface
.get_topological_path(fuchsia_zircon::Time::INFINITE)
.map_err(|_| zx::Status::IO)?;
fuchsia_zircon::Status::ok(status)?;
match topo {
Some(topo) => Ok(topo),
None => Err(zx::Status::BAD_STATE),
}
}
/// Creates a named pipe and returns one end as a zx::Socket.
pub fn pipe_half() -> Result<(std::fs::File, zx::Socket), zx::Status> {
unsafe {
let mut fd = -1;
let mut handle = zx::sys::ZX_HANDLE_INVALID;
let status =
fdio_sys::fdio_pipe_half(&mut fd as *mut i32, &mut handle as *mut zx::sys::zx_handle_t);
if status != zx::sys::ZX_OK {
return Err(zx::Status::from_raw(status));
}
Ok((std::fs::File::from_raw_fd(fd), zx::Socket::from(zx::Handle::from_raw(handle))))
}
}
bitflags! {
/// Options to allow some or all of the environment of the running process
/// to be shared with the process being spawned.
pub struct SpawnOptions: u32 {
/// Provide the spawned process with the job in which the process was created.
///
/// The job will be available to the new process as the PA_JOB_DEFAULT argument
/// (exposed in Rust as `fuchsia_runtim::job_default()`).
const CLONE_JOB = fdio_sys::FDIO_SPAWN_CLONE_JOB;
/// Provide the spawned process with the shared library loader via the
/// PA_LDSVC_LOADER argument.
const DEFAULT_LOADER = fdio_sys::FDIO_SPAWN_DEFAULT_LDSVC;
/// Clones the filesystem namespace into the spawned process.
const CLONE_NAMESPACE = fdio_sys::FDIO_SPAWN_CLONE_NAMESPACE;
/// Clones file descriptors 0, 1, and 2 into the spawned process.
///
/// Skips any of these file descriptors that are closed without
/// generating an error.
const CLONE_STDIO = fdio_sys::FDIO_SPAWN_CLONE_STDIO;
/// Clones the environment into the spawned process.
const CLONE_ENVIRONMENT = fdio_sys::FDIO_SPAWN_CLONE_ENVIRON;
/// Clones the namespace, stdio, and environment into the spawned process.
const CLONE_ALL = fdio_sys::FDIO_SPAWN_CLONE_ALL;
}
}
// TODO: someday we'll have custom DSTs which will make this unnecessary.
fn nul_term_from_slice(argv: &[&CStr]) -> Vec<*const raw::c_char> {
argv.iter().map(|cstr| cstr.as_ptr()).chain(std::iter::once(0 as *const raw::c_char)).collect()
}
/// Spawn a process in the given `job`.
pub fn spawn(
job: &zx::Job,
options: SpawnOptions,
path: &CStr,
argv: &[&CStr],
) -> Result<zx::Process, zx::Status> {
let job = job.raw_handle();
let flags = options.bits();
let path = path.as_ptr();
let argv = nul_term_from_slice(argv);
let mut process_out = 0;
// Safety: spawn consumes no handles and frees no pointers, and only
// produces a valid process upon success.
let status = unsafe { fdio_sys::fdio_spawn(job, flags, path, argv.as_ptr(), &mut process_out) };
zx::ok(status)?;
Ok(zx::Process::from(unsafe { zx::Handle::from_raw(process_out) }))
}
/// An action to take in `spawn_etc`.
#[repr(transparent)]
pub struct SpawnAction<'a>(fdio_sys::fdio_spawn_action_t, PhantomData<&'a ()>);
impl<'a> SpawnAction<'a> {
/// Clone a file descriptor into the new process.
///
/// `local_fd`: File descriptor within the current process.
/// `target_fd`: File descriptor within the new process that will receive the clone.
pub fn clone_fd(local_fd: &'a File, target_fd: i32) -> Self {
// Safety: `local_fd` is a valid file descriptor so long as we're inside the
// 'a lifetime.
Self(
fdio_sys::fdio_spawn_action_t {
action_tag: fdio_sys::FDIO_SPAWN_ACTION_CLONE_FD,
action_value: fdio_sys::fdio_spawn_action_union_t {
fd: fdio_sys::fdio_spawn_action_fd_t {
local_fd: local_fd.as_raw_fd(),
target_fd,
},
},
},
PhantomData,
)
}
/// Transfer a file descriptor into the new process.
///
/// `local_fd`: File descriptor within the current process.
/// `target_fd`: File descriptor within the new process that will receive the transfer.
pub fn transfer_fd(local_fd: File, target_fd: i32) -> Self {
// Safety: ownership of `local_fd` is consumed, so `Self` can live arbitrarily long.
// When the action is executed, the fd will be transferred.
Self(
fdio_sys::fdio_spawn_action_t {
action_tag: fdio_sys::FDIO_SPAWN_ACTION_TRANSFER_FD,
action_value: fdio_sys::fdio_spawn_action_union_t {
fd: fdio_sys::fdio_spawn_action_fd_t {
local_fd: local_fd.into_raw_fd(),
target_fd,
},
},
},
PhantomData,
)
}
/// Add the given entry to the namespace of the spawned process.
///
/// If `SpawnOptions::CLONE_NAMESPACE` is set, the namespace entry is added
/// to the cloned namespace from the calling process.
pub fn add_namespace_entry(prefix: &'a CStr, handle: zx::Handle) -> Self {
// Safety: ownership of the `handle` is consumed.
// The prefix string must stay valid through the 'a lifetime.
Self(
fdio_sys::fdio_spawn_action_t {
action_tag: fdio_sys::FDIO_SPAWN_ACTION_ADD_NS_ENTRY,
action_value: fdio_sys::fdio_spawn_action_union_t {
ns: fdio_sys::fdio_spawn_action_ns_t {
prefix: prefix.as_ptr(),
handle: handle.into_raw(),
},
},
},
PhantomData,
)
}
/// Add the given handle to the process arguments of the spawned process.
pub fn add_handle(kind: fuchsia_runtime::HandleInfo, handle: zx::Handle) -> Self {
// Safety: ownership of the `handle` is consumed.
// The prefix string must stay valid through the 'a lifetime.
Self(
fdio_sys::fdio_spawn_action_t {
action_tag: fdio_sys::FDIO_SPAWN_ACTION_ADD_HANDLE,
action_value: fdio_sys::fdio_spawn_action_union_t {
h: fdio_sys::fdio_spawn_action_h_t {
id: kind.as_raw(),
handle: handle.into_raw(),
},
},
},
PhantomData,
)
}
/// Sets the name of the spawned process to the given name.
pub fn set_name(name: &'a CStr) -> Self {
// Safety: the `name` pointer must be valid at least as long as `Self`.
Self(
fdio_sys::fdio_spawn_action_t {
action_tag: fdio_sys::FDIO_SPAWN_ACTION_SET_NAME,
action_value: fdio_sys::fdio_spawn_action_union_t {
name: fdio_sys::fdio_spawn_action_name_t { data: name.as_ptr() },
},
},
PhantomData,
)
}
fn is_null(&self) -> bool {
self.0.action_tag == 0
}
/// Nullifies the action to prevent the inner contents from being dropped.
fn nullify(&mut self) {
// Assert that our null value doesn't conflict with any "real" actions.
debug_assert!(
(fdio_sys::FDIO_SPAWN_ACTION_CLONE_FD != 0)
&& (fdio_sys::FDIO_SPAWN_ACTION_TRANSFER_FD != 0)
&& (fdio_sys::FDIO_SPAWN_ACTION_ADD_NS_ENTRY != 0)
&& (fdio_sys::FDIO_SPAWN_ACTION_ADD_HANDLE != 0)
&& (fdio_sys::FDIO_SPAWN_ACTION_SET_NAME != 0)
);
self.0.action_tag = 0;
}
}
fn spawn_with_actions(
job: &zx::Job,
options: SpawnOptions,
argv: &[&CStr],
environ: Option<&[&CStr]>,
actions: &mut [SpawnAction],
spawn_fn: impl FnOnce(
zx_handle_t, // job
u32, // flags
*const *const raw::c_char, // argv
*const *const raw::c_char, // environ
usize, // action_count
*const fdio_sys::fdio_spawn_action_t, // actions
*mut zx_handle_t, // process_out,
*mut [raw::c_char; fdio_sys::FDIO_SPAWN_ERR_MSG_MAX_LENGTH as usize], // err_msg_out
) -> zx_status_t,
) -> Result<zx::Process, (zx::Status, String)> {
let job = job.raw_handle();
let flags = options.bits();
let argv = nul_term_from_slice(argv);
let environ_vec;
let environ_ptr = match environ {
Some(e) => {
environ_vec = nul_term_from_slice(e);
environ_vec.as_ptr()
}
None => std::ptr::null(),
};
if actions.iter().any(|a| a.is_null()) {
return Err((zx::Status::INVALID_ARGS, "null SpawnAction".to_string()));
}
// Safety: actions are repr(transparent) wrappers around fdio_spawn_action_t
let action_count = actions.len();
let actions_ptr: *const SpawnAction = actions.as_ptr();
let actions_ptr = actions_ptr as *const fdio_sys::fdio_spawn_action_t;
let mut process_out = 0;
let mut err_msg_out = [0 as raw::c_char; fdio_sys::FDIO_SPAWN_ERR_MSG_MAX_LENGTH as usize];
let status = spawn_fn(
job,
flags,
argv.as_ptr(),
environ_ptr,
action_count,
actions_ptr,
&mut process_out,
&mut err_msg_out,
);
zx::ok(status).map_err(|status| {
let err_msg =
unsafe { CStr::from_ptr(err_msg_out.as_ptr()) }.to_string_lossy().into_owned();
(status, err_msg)
})?;
// Clear out the actions so we can't unsafely re-use them in a future call.
actions.iter_mut().for_each(|a| a.nullify());
Ok(zx::Process::from(unsafe { zx::Handle::from_raw(process_out) }))
}
/// Spawn a process in the given `job` using a series of `SpawnAction`s.
/// All `SpawnAction`s are nullified after their use in this function.
pub fn spawn_etc(
job: &zx::Job,
options: SpawnOptions,
path: &CStr,
argv: &[&CStr],
environ: Option<&[&CStr]>,
actions: &mut [SpawnAction],
) -> Result<zx::Process, (zx::Status, String)> {
let path = path.as_ptr();
spawn_with_actions(
job,
options,
argv,
environ,
actions,
|job, flags, argv, environ, action_count, actions_ptr, process_out, err_msg_out| unsafe {
fdio_sys::fdio_spawn_etc(
job,
flags,
path,
argv,
environ,
action_count,
actions_ptr,
process_out,
err_msg_out,
)
},
)
}
/// Spawn a process in the given job using an executable VMO.
pub fn spawn_vmo(
job: &zx::Job,
options: SpawnOptions,
executable_vmo: zx::Vmo,
argv: &[&CStr],
environ: Option<&[&CStr]>,
actions: &mut [SpawnAction],
) -> Result<zx::Process, (zx::Status, String)> {
let executable_vmo = executable_vmo.into_raw();
spawn_with_actions(
job,
options,
argv,
environ,
actions,
|job, flags, argv, environ, action_count, actions_ptr, process_out, err_msg_out| unsafe {
fdio_sys::fdio_spawn_vmo(
job,
flags,
executable_vmo,
argv,
environ,
action_count,
actions_ptr,
process_out,
err_msg_out,
)
},
)
}
/// Events that can occur while watching a directory, including files that already exist prior to
/// running a Watcher.
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum WatchEvent {
/// A file was added.
AddFile,
/// A file was removed.
RemoveFile,
/// The Watcher has enumerated all the existing files and has started to wait for new files to
/// be added.
Idle,
Unknown(i32),
#[doc(hidden)]
#[allow(non_camel_case_types)]
// Try to prevent exhaustive matching since this enum may grow if fdio's events expand.
__do_not_match,
}
impl From<raw::c_int> for WatchEvent {
fn from(i: raw::c_int) -> WatchEvent {
match i {
fdio_sys::WATCH_EVENT_ADD_FILE => WatchEvent::AddFile,
fdio_sys::WATCH_EVENT_REMOVE_FILE => WatchEvent::RemoveFile,
fdio_sys::WATCH_EVENT_IDLE => WatchEvent::Idle,
_ => WatchEvent::Unknown(i),
}
}
}
impl From<WatchEvent> for raw::c_int {
fn from(i: WatchEvent) -> raw::c_int {
match i {
WatchEvent::AddFile => fdio_sys::WATCH_EVENT_ADD_FILE,
WatchEvent::RemoveFile => fdio_sys::WATCH_EVENT_REMOVE_FILE,
WatchEvent::Idle => fdio_sys::WATCH_EVENT_IDLE,
WatchEvent::Unknown(i) => i as raw::c_int,
_ => -1 as raw::c_int,
}
}
}
unsafe extern "C" fn watcher_cb<F>(
_dirfd: raw::c_int,
event: raw::c_int,
fn_: *const raw::c_char,
watcher: *mut raw::c_void,
) -> sys::zx_status_t
where
F: Sized + FnMut(WatchEvent, &Path) -> Result<(), zx::Status>,
{
let cb: &mut F = &mut *(watcher as *mut F);
let filename = ffi::OsStr::from_bytes(CStr::from_ptr(fn_).to_bytes());
match cb(WatchEvent::from(event), Path::new(filename)) {
Ok(()) => sys::ZX_OK,
Err(e) => e.into_raw(),
}
}
/// Runs the given callback for each file in the directory and each time a new file is
/// added to the directory.
///
/// If the callback returns an error, the watching stops, and the zx::Status is returned.
///
/// This function blocks for the duration of the watch operation. The deadline parameter will stop
/// the watch at the given (absolute) time and return zx::Status::TIMED_OUT. A deadline of
/// zx::ZX_TIME_INFINITE will never expire.
///
/// The callback may use zx::Status::STOP as a way to signal to the caller that it wants to
/// stop because it found what it was looking for. Since this error code is not returned by
/// syscalls or public APIs, the callback does not need to worry about it turning up normally.
pub fn watch_directory<F>(dir: &File, deadline: sys::zx_time_t, mut f: F) -> zx::Status
where
F: Sized + FnMut(WatchEvent, &Path) -> Result<(), zx::Status>,
{
let cb_ptr: *mut raw::c_void = &mut f as *mut _ as *mut raw::c_void;
unsafe {
zx::Status::from_raw(fdio_sys::fdio_watch_directory(
dir.as_raw_fd(),
Some(watcher_cb::<F>),
deadline,
cb_ptr,
))
}
}
/// Gets a read-only VMO containing the whole contents of the file. This function
/// creates a clone of the underlying VMO when possible, falling back to eagerly
/// reading the contents into a freshly-created VMO.
pub fn get_vmo_copy_from_file(file: &File) -> Result<zx::Vmo, zx::Status> {
unsafe {
let mut vmo_handle: zx::sys::zx_handle_t = zx::sys::ZX_HANDLE_INVALID;
match fdio_sys::fdio_get_vmo_copy(file.as_raw_fd(), &mut vmo_handle) {
0 => Ok(zx::Vmo::from(zx::Handle::from_raw(vmo_handle))),
error_code => Err(zx::Status::from_raw(error_code)),
}
}
}
pub struct Namespace {
ns: *mut fdio_sys::fdio_ns_t,
}
impl Namespace {
/// Get the currently installed namespace.
pub fn installed() -> Result<Self, zx::Status> {
let mut ns_ptr: *mut fdio_sys::fdio_ns_t = ptr::null_mut();
let status = unsafe { fdio_sys::fdio_ns_get_installed(&mut ns_ptr) };
zx::Status::ok(status)?;
Ok(Namespace { ns: ns_ptr })
}
/// Create a channel that is connected to a service bound in this namespace at path. The path
/// must be an absolute path, like "/x/y/z", containing no "." nor ".." entries. It is relative
/// to the root of the namespace.
///
/// This corresponds with fdio_ns_connect in C.
pub fn connect(&self, path: &str, flags: u32, channel: zx::Channel) -> Result<(), zx::Status> {
let cstr = CString::new(path)?;
let status =
unsafe { fdio_sys::fdio_ns_connect(self.ns, cstr.as_ptr(), flags, channel.into_raw()) };
zx::Status::ok(status)?;
Ok(())
}
/// Create a new directory within the namespace, bound to the provided
/// directory-protocol-compatible channel. The path must be an absolute path, like "/x/y/z",
/// containing no "." nor ".." entries. It is relative to the root of the namespace.
///
/// This corresponds with fdio_ns_bind in C.
pub fn bind(&self, path: &str, channel: zx::Channel) -> Result<(), zx::Status> {
let cstr = CString::new(path)?;
let status = unsafe { fdio_sys::fdio_ns_bind(self.ns, cstr.as_ptr(), channel.into_raw()) };
zx::Status::ok(status)
}
/// Unbind the channel at path, closing the associated handle when all references to the node go
/// out of scope. The path must be an absolute path, like "/x/y/z", containing no "." nor ".."
/// entries. It is relative to the root of the namespace.
///
/// This corresponds with fdio_ns_unbind in C.
pub fn unbind(&self, path: &str) -> Result<(), zx::Status> {
let cstr = CString::new(path)?;
let status = unsafe { fdio_sys::fdio_ns_unbind(self.ns, cstr.as_ptr()) };
zx::Status::ok(status)
}
pub fn into_raw(self) -> *mut fdio_sys::fdio_ns_t {
self.ns
}
}
#[cfg(test)]
mod tests {
use {
super::*,
fidl_fuchsia_io as fio,
fuchsia_zircon::{object_wait_many, Signals, Status, Time, WaitItem},
};
#[test]
fn namespace_get_installed() {
let namespace = Namespace::installed().expect("failed to get installed namespace");
assert!(!namespace.into_raw().is_null());
}
#[test]
fn namespace_bind_connect_unbind() {
let namespace = Namespace::installed().unwrap();
// client => ns_server => ns_client => server
// ^ ^ ^-- zx channel connection
// | |-- connected through namespace bind/connect
// |-- zx channel connection
let (ns_client, _server) = zx::Channel::create().unwrap();
let (_client, ns_server) = zx::Channel::create().unwrap();
let path = "/test_path1";
assert_eq!(namespace.bind(path, ns_client), Ok(()));
assert_eq!(namespace.connect(path, 0, ns_server), Ok(()));
assert_eq!(namespace.unbind(path), Ok(()));
}
#[test]
fn namespace_double_bind_fail() {
let namespace = Namespace::installed().unwrap();
let (ns_client1, _server1) = zx::Channel::create().unwrap();
let (ns_client2, _server2) = zx::Channel::create().unwrap();
let path = "/test_path2";
assert_eq!(namespace.bind(path, ns_client1), Ok(()));
assert_eq!(namespace.bind(path, ns_client2), Err(zx::Status::ALREADY_EXISTS));
assert_eq!(namespace.unbind(path), Ok(()));
}
#[test]
fn namespace_connect_fail() {
let namespace = Namespace::installed().unwrap();
let (_client, ns_server) = zx::Channel::create().unwrap();
let path = "/test_path3";
assert_eq!(namespace.connect(path, 0, ns_server), Err(zx::Status::NOT_FOUND));
}
#[test]
fn namespace_unbind_fail() {
let namespace = Namespace::installed().unwrap();
let path = "/test_path4";
assert_eq!(namespace.unbind(path), Err(zx::Status::NOT_FOUND));
}
fn cstr(orig: &str) -> CString {
CString::new(orig).expect("CString::new failed")
}
#[test]
fn fdio_spawn_run_target_bin_no_env() {
let job = zx::Job::from(zx::Handle::invalid());
let cpath = cstr("/pkg/bin/spawn_test_target");
let (stdout_file, stdout_sock) = pipe_half().expect("Failed to make pipe");
let mut spawn_actions = [SpawnAction::clone_fd(&stdout_file, 1)];
let cstrags: Vec<CString> = vec![cstr("test_arg")];
let mut cargs: Vec<&CStr> = cstrags.iter().map(|x| x.as_c_str()).collect();
cargs.insert(0, cpath.as_c_str());
let process = spawn_etc(
&job,
SpawnOptions::CLONE_ALL,
cpath.as_c_str(),
cargs.as_slice(),
None,
&mut spawn_actions,
)
.expect("Unable to spawn process");
let mut output = vec![];
loop {
let mut items = vec![
WaitItem {
handle: process.as_handle_ref(),
waitfor: Signals::PROCESS_TERMINATED,
pending: Signals::NONE,
},
WaitItem {
handle: stdout_sock.as_handle_ref(),
waitfor: Signals::SOCKET_READABLE | Signals::SOCKET_PEER_CLOSED,
pending: Signals::NONE,
},
];
let signals_result =
object_wait_many(&mut items, Time::INFINITE).expect("unable to wait");
if items[1].pending.contains(Signals::SOCKET_READABLE) {
let bytes_len = stdout_sock.outstanding_read_bytes().expect("Socket error");
let mut buf: Vec<u8> = vec![0; bytes_len];
let read_len = stdout_sock
.read(&mut buf[..])
.or_else(|status| match status {
Status::SHOULD_WAIT => Ok(0),
_ => Err(status),
})
.expect("Unable to read buff");
output.extend_from_slice(&buf[0..read_len]);
}
// read stdout buffer until test process dies or the socket is closed
if items[1].pending.contains(Signals::SOCKET_PEER_CLOSED) {
break;
}
if items[0].pending.contains(Signals::PROCESS_TERMINATED) {
break;
}
if signals_result {
break;
};
}
assert_eq!(String::from_utf8(output).expect("unable to decode stdout"), "hello world\n");
}
// Simple tests of the fdio_open and fdio_open_at wrappers. These aren't intended to
// exhaustively test the fdio functions - there are separate tests for that - but they do
// exercise one success and one failure case for each function.
#[test]
fn fdio_open_and_open_at() {
// fdio_open requires paths to be absolute
let (_, pkg_server) = zx::Channel::create().unwrap();
assert_eq!(open("pkg", fio::OPEN_RIGHT_READABLE, pkg_server), Err(zx::Status::NOT_FOUND));
let (pkg_client, pkg_server) = zx::Channel::create().unwrap();
assert_eq!(open("/pkg", fio::OPEN_RIGHT_READABLE, pkg_server), Ok(()));
// fdio_open/fdio_open_at do not support OPEN_FLAG_DESCRIBE
let (_, bin_server) = zx::Channel::create().unwrap();
assert_eq!(
open_at(
&pkg_client,
"bin",
fio::OPEN_RIGHT_READABLE | fio::OPEN_FLAG_DESCRIBE,
bin_server
),
Err(zx::Status::INVALID_ARGS)
);
let (_, bin_server) = zx::Channel::create().unwrap();
assert_eq!(open_at(&pkg_client, "bin", fio::OPEN_RIGHT_READABLE, bin_server), Ok(()));
}
// Simple tests of the fdio_open_fd and fdio_open_fd_at wrappers. These aren't intended to
// exhaustively test the fdio functions - there are separate tests for that - but they do
// exercise one success and one failure case for each function.
#[test]
fn fdio_open_fd_and_open_fd_at() {
// fdio_open_fd requires paths to be absolute
match open_fd("pkg", fio::OPEN_RIGHT_READABLE) {
Err(zx::Status::NOT_FOUND) => {}
Ok(_) => panic!("fdio_open_fd with relative path unexpectedly succeeded"),
Err(err) => panic!("Unexpected error from fdio_open_fd: {}", err),
}
let pkg_fd = open_fd("/pkg", fio::OPEN_RIGHT_READABLE)
.expect("Failed to open /pkg using fdio_open_fd");
// Trying to open a non-existent directory should fail.
match open_fd_at(&pkg_fd, "blahblah", fio::OPEN_RIGHT_READABLE) {
Err(zx::Status::NOT_FOUND) => {}
Ok(_) => panic!("fdio_open_fd_at with greater rights unexpectedly succeeded"),
Err(err) => panic!("Unexpected error from fdio_open_fd_at: {}", err),
}
open_fd_at(&pkg_fd, "bin", fio::OPEN_RIGHT_READABLE)
.expect("Failed to open bin/ subdirectory using fdio_open_fd_at");
}
}
|
//! General Purpose Input/Output
use core::marker::PhantomData;
use crate::pac;
/// Extension trait to split GLB peripheral into independent pins, registers and other modules
pub trait GlbExt {
/// Splits the register block into independent pins and modules
fn split(self) -> Parts;
}
pub use uart_sig::*;
/// UART signals
pub mod uart_sig {
use core::marker::PhantomData;
use crate::pac;
/// UART0 RTS (type state)
pub struct Uart0Rts;
/// UART0 CTS (type state)
pub struct Uart0Cts;
/// UART0 TXD (type state)
pub struct Uart0Tx;
/// UART0 RXD (type state)
pub struct Uart0Rx;
/// UART1 RXD (type state)
pub struct Uart1Rx;
/// UART1 RTS (type state)
pub struct Uart1Rts;
/// UART1 CTS (type state)
pub struct Uart1Cts;
/// UART1 TXD (type state)
pub struct Uart1Tx;
macro_rules! impl_uart_sig {
($UartSigi: ident, $doc1: expr, $sigi:ident, $UartMuxi: ident, $doc2: expr) => {
#[doc = $doc1]
pub struct $UartSigi;
#[doc = $doc2]
pub struct $UartMuxi<MODE> {
pub(crate) _mode: PhantomData<MODE>,
}
impl<MODE> $UartMuxi<MODE> {
/// Configure the internal UART signal to UART0-RTS
pub fn into_uart0_rts(self) -> $UartMuxi<Uart0Rts> {
self.into_uart_mode(0)
}
/// Configure the internal UART signal to UART0-CTS
pub fn into_uart0_cts(self) -> $UartMuxi<Uart0Cts> {
self.into_uart_mode(1)
}
/// Configure the internal UART signal to UART0-TX
pub fn into_uart0_tx(self) -> $UartMuxi<Uart0Tx> {
self.into_uart_mode(2)
}
/// Configure the internal UART signal to UART0-RX
pub fn into_uart0_rx(self) -> $UartMuxi<Uart0Rx> {
self.into_uart_mode(3)
}
/// Configure the internal UART signal to UART1-RTS
pub fn into_uart1_rts(self) -> $UartMuxi<Uart1Rts> {
self.into_uart_mode(4)
}
/// Configure the internal UART signal to UART1-CTS
pub fn into_uart1_cts(self) -> $UartMuxi<Uart1Cts> {
self.into_uart_mode(5)
}
/// Configure the internal UART signal to UART1-TX
pub fn into_uart1_tx(self) -> $UartMuxi<Uart1Tx> {
self.into_uart_mode(6)
}
/// Configure the internal UART signal to UART1-RX
pub fn into_uart1_rx(self) -> $UartMuxi<Uart1Rx> {
self.into_uart_mode(7)
}
paste::paste! {
#[inline]
fn into_uart_mode<T>(self, mode: u8) -> $UartMuxi<T> {
let glb = unsafe { &*pac::GLB::ptr() };
glb.uart_sig_sel_0.modify(|_r, w| unsafe { w
.[<uart_ $sigi _sel>]().bits(mode)
});
$UartMuxi { _mode: PhantomData }
}
}
}
};
}
impl_uart_sig!(
UartSig0,
"UART signal 0 (type state)",
sig_0,
UartMux0,
"UART multiplexer peripherals for signal 0"
);
impl_uart_sig!(
UartSig1,
"UART signal 1 (type state)",
sig_1,
UartMux1,
"UART multiplexer peripherals for signal 1"
);
impl_uart_sig!(
UartSig2,
"UART signal 2 (type state)",
sig_2,
UartMux2,
"UART multiplexer peripherals for signal 2"
);
impl_uart_sig!(
UartSig3,
"UART signal 3 (type state)",
sig_3,
UartMux3,
"UART multiplexer peripherals for signal 3"
);
impl_uart_sig!(
UartSig4,
"UART signal 4 (type state)",
sig_4,
UartMux4,
"UART multiplexer peripherals for signal 4"
);
impl_uart_sig!(
UartSig5,
"UART signal 5 (type state)",
sig_5,
UartMux5,
"UART multiplexer peripherals for signal 5"
);
impl_uart_sig!(
UartSig6,
"UART signal 6 (type state)",
sig_6,
UartMux6,
"UART multiplexer peripherals for signal 6"
);
impl_uart_sig!(
UartSig7,
"UART signal 7 (type state)",
sig_7,
UartMux7,
"UART multiplexer peripherals for signal 7"
);
}
/// Clock configurator registers
pub struct ClkCfg {
pub(crate) _ownership: (),
}
/*
// todo: english
在GPIO模式下,可以设置内部上下拉,以类型状态机模式设计
SPI、UART、I2C等数字功能下,可以设置内部上下拉,但不会影响返回类型的状态
ADC、DAC下,软件禁止设置内部上下拉。HAL库不会生成此类函数,以免出错。
*/
/// Hi-Z Floating pin (type state)
pub struct Floating;
/// Pulled down pin (type state)
pub struct PullDown;
/// Pulled up pin (type state)
pub struct PullUp;
/// Input mode (type state)
pub struct Input<MODE> {
_mode: PhantomData<MODE>,
}
/// Output mode (type state)
pub struct Output<MODE> {
_mode: PhantomData<MODE>,
}
/// UART pin mode (type state)
pub struct Uart;
#[doc(hidden)]
pub trait UartPin<SIG> {}
// There are Pin0 to Pin22, totally 23 pins
pub use self::pin::*;
macro_rules! impl_glb {
($($Pini: ident: ($pini: ident, $gpio_cfgctli: ident, $UartSigi: ident, $sigi: ident, $gpio_i: ident) ,)+) => {
impl GlbExt for pac::GLB {
fn split(self) -> Parts {
Parts {
$( $pini: $Pini { _mode: PhantomData }, )+
uart_mux0: UartMux0 { _mode: PhantomData },
uart_mux1: UartMux1 { _mode: PhantomData },
uart_mux2: UartMux2 { _mode: PhantomData },
uart_mux3: UartMux3 { _mode: PhantomData },
uart_mux4: UartMux4 { _mode: PhantomData },
uart_mux5: UartMux5 { _mode: PhantomData },
uart_mux6: UartMux6 { _mode: PhantomData },
uart_mux7: UartMux7 { _mode: PhantomData },
clk_cfg: ClkCfg { _ownership: () },
}
}
}
/// GPIO parts
pub struct Parts {
$( pub $pini: $Pini<Input<Floating>>, )+
pub uart_mux0: UartMux0<Uart0Cts>,
pub uart_mux1: UartMux1<Uart0Cts>,
pub uart_mux2: UartMux2<Uart0Cts>,
pub uart_mux3: UartMux3<Uart0Cts>,
pub uart_mux4: UartMux4<Uart0Cts>,
pub uart_mux5: UartMux5<Uart0Cts>,
pub uart_mux6: UartMux6<Uart0Cts>,
pub uart_mux7: UartMux7<Uart0Cts>,
pub clk_cfg: ClkCfg,
}
/// GPIO pins
pub mod pin {
use core::marker::PhantomData;
use core::convert::Infallible;
use embedded_hal::digital::{InputPin, OutputPin, StatefulOutputPin, toggleable};
use crate::pac;
use super::*;
$(
/// Pin
pub struct $Pini<MODE> {
pub(crate) _mode: PhantomData<MODE>,
}
impl<MODE> $Pini<MODE> {
// 11 -> GPIO_FUN_SWGPIO
/// Configures the pin to operate as a Hi-Z floating output pin.
pub fn into_floating_output(self) -> $Pini<Output<Floating>> {
self.into_pin_with_mode(11, false, false, false)
}
/// Configures the pin to operate as a pull-up output pin.
pub fn into_pull_up_output(self) -> $Pini<Output<PullUp>> {
self.into_pin_with_mode(11, true, false, false)
}
/// Configures the pin to operate as a pull-down output pin.
pub fn into_pull_down_output(self) -> $Pini<Output<PullDown>> {
self.into_pin_with_mode(11, false, true, false)
}
/// Configures the pin to operate as a Hi-Z floating input pin.
pub fn into_floating_input(self) -> $Pini<Input<Floating>> {
self.into_pin_with_mode(11, false, false, true)
}
/// Configures the pin to operate as a pull-up input pin.
pub fn into_pull_up_input(self) -> $Pini<Input<PullUp>> {
self.into_pin_with_mode(11, true, false, true)
}
/// Configures the pin to operate as a pull-down input pin.
pub fn into_pull_down_input(self) -> $Pini<Input<PullDown>> {
self.into_pin_with_mode(11, false, true, true)
}
paste::paste! {
#[inline]
fn into_pin_with_mode<T>(self, mode: u8, pu: bool, pd: bool, ie: bool) -> $Pini<T> {
let glb = unsafe { &*pac::GLB::ptr() };
glb.$gpio_cfgctli.modify(|_r, w| unsafe { w
.[<reg_ $gpio_i _func_sel>]().bits(mode)
.[<reg_ $gpio_i _ie>]().bit(ie) // output
.[<reg_ $gpio_i _pu>]().bit(pu)
.[<reg_ $gpio_i _pd>]().bit(pd)
.[<reg_ $gpio_i _drv>]().bits(0) // disabled
.[<reg_ $gpio_i _smt>]().clear_bit()
});
// If we're an input clear the Output Enable bit as well, else set it.
glb.gpio_cfgctl34.modify(|_, w| w.[<reg_ $gpio_i _oe>]().bit(!ie));
$Pini { _mode: PhantomData }
}
}
}
impl<MODE> $Pini<Input<MODE>> {
paste::paste! {
/// Enable smitter GPIO input filter
pub fn enable_smitter(&mut self) {
let glb = unsafe { &*pac::GLB::ptr() };
glb.$gpio_cfgctli.modify(|_, w| w.[<reg_ $gpio_i _smt>]().set_bit());
}
/// Enable smitter GPIO output filter
pub fn disable_smitter(&mut self) {
let glb = unsafe { &*pac::GLB::ptr() };
glb.$gpio_cfgctli.modify(|_, w| w.[<reg_ $gpio_i _smt>]().clear_bit());
}
}
}
impl<MODE> $Pini<MODE> {
paste::paste! {
/// Configures the pin to UART alternate mode
pub fn [<into_uart_ $sigi>](self) -> $Pini<Uart> {
// 7 -> GPIO_FUN_UART
self.into_pin_with_mode(7, true, false, true)
}
}
}
impl UartPin<$UartSigi> for $Pini<Uart> {}
impl<MODE> InputPin for $Pini<Input<MODE>> {
type Error = Infallible;
paste::paste! {
fn try_is_high(&self) -> Result<bool, Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
Ok(glb.gpio_cfgctl30.read().[<reg_ $gpio_i _i>]().bit_is_set())
}
fn try_is_low(&self) -> Result<bool, Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
Ok(glb.gpio_cfgctl30.read().[<reg_ $gpio_i _i>]().bit_is_clear())
}
}
}
impl<MODE> OutputPin for $Pini<Output<MODE>> {
type Error = Infallible;
paste::paste! {
fn try_set_high(&mut self) -> Result<(), Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
glb.gpio_cfgctl32.modify(|_, w| w.[<reg_ $gpio_i _o>]().set_bit());
Ok(())
}
fn try_set_low(&mut self) -> Result<(), Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
glb.gpio_cfgctl32.modify(|_, w| w.[<reg_ $gpio_i _o>]().clear_bit());
Ok(())
}
}
}
impl<MODE> StatefulOutputPin for $Pini<Output<MODE>> {
paste::paste! {
fn try_is_set_high(&self) -> Result<bool, Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
Ok(glb.gpio_cfgctl32.read().[<reg_ $gpio_i _o>]().bit_is_set())
}
fn try_is_set_low(&self) -> Result<bool, Self::Error> {
let glb = unsafe { &*pac::GLB::ptr() };
Ok(glb.gpio_cfgctl32.read().[<reg_ $gpio_i _o>]().bit_is_clear())
}
}
}
impl<MODE> toggleable::Default for $Pini<Output<MODE>> {}
)+
}
};
}
// There are Pin0 to Pin22, totally 23 pins
// todo: generate macros
impl_glb! {
Pin0: (pin0, gpio_cfgctl0, UartSig0, sig0, gpio_0),
Pin1: (pin1, gpio_cfgctl0, UartSig1, sig1, gpio_1),
Pin2: (pin2, gpio_cfgctl1, UartSig2, sig2, gpio_2),
Pin3: (pin3, gpio_cfgctl1, UartSig3, sig3, gpio_3),
Pin4: (pin4, gpio_cfgctl2, UartSig4, sig4, gpio_4),
Pin5: (pin5, gpio_cfgctl2, UartSig5, sig5, gpio_5),
Pin6: (pin6, gpio_cfgctl3, UartSig6, sig6, gpio_6),
Pin7: (pin7, gpio_cfgctl3, UartSig7, sig7, gpio_7),
Pin8: (pin8, gpio_cfgctl4, UartSig0, sig0, gpio_8),
Pin9: (pin9, gpio_cfgctl4, UartSig1, sig1, gpio_9),
Pin10: (pin10, gpio_cfgctl5, UartSig2, sig2, gpio_10),
Pin11: (pin11, gpio_cfgctl5, UartSig3, sig3, gpio_11),
Pin12: (pin12, gpio_cfgctl6, UartSig4, sig4, gpio_12),
Pin13: (pin13, gpio_cfgctl6, UartSig5, sig5, gpio_13),
Pin14: (pin14, gpio_cfgctl7, UartSig6, sig6, gpio_14),
Pin15: (pin15, gpio_cfgctl7, UartSig7, sig7, gpio_15),
Pin16: (pin16, gpio_cfgctl8, UartSig0, sig0, gpio_16),
Pin17: (pin17, gpio_cfgctl8, UartSig1, sig1, gpio_17),
Pin18: (pin18, gpio_cfgctl9, UartSig2, sig2, gpio_18),
Pin19: (pin19, gpio_cfgctl9, UartSig3, sig3, gpio_19),
Pin20: (pin20, gpio_cfgctl10, UartSig4, sig4, gpio_20),
Pin21: (pin21, gpio_cfgctl10, UartSig5, sig5, gpio_21),
Pin22: (pin22, gpio_cfgctl11, UartSig6, sig6, gpio_22),
}
|
use std::marker::PhantomData;
use num::traits::NumAssignRef;
use num::integer::Integer;
use super::checker::PrimeChecker;
use extra_ops::{ModPow, RandInt};
pub struct MillerRabinChecker<N> {
witnessess: usize,
_phantom: PhantomData<N>
}
impl<N> MillerRabinChecker<N> {
pub fn new(witnessess: usize) -> Self {
MillerRabinChecker {
witnessess,
_phantom: Default::default()
}
}
}
impl<N> PrimeChecker for MillerRabinChecker<N>
where N: NumAssignRef + ModPow + RandInt + Integer + Clone
{
type Value = N;
fn check(&self, value: &Self::Value) -> bool {
miller_rabin(value, self.witnessess)
}
}
fn extract_pow2<N>(n: N) -> (N, N)
where N: NumAssignRef + Integer
{
let one = N::one();
let two = N::one() + N::one();
let mut d = n;
let mut r = N::zero();
while d.is_even() {
d /= &two;
r += &one;
}
(d, r)
}
fn miller_rabin<N>(n: &N, k: usize) -> bool
where N: NumAssignRef + ModPow + RandInt + Integer + Clone
{
let zero = N::zero();
let one = N::one();
let two = N::one() + N::one();
// corner case that leads to infinite loop in generate_candidate()
{
let three = two.clone() + N::one();
if n == &three {
return true;
}
}
let n_1 = {
let mut n = n.clone();
n -= &one;
n
};
let (d, r) = extract_pow2(n_1.clone());
let generate_candidate = |n| {
loop {
let num = N::get_rand_below(n);
if num != one && num != zero {
break num;
}
}
};
(0..k).into_iter()
.map(|_| generate_candidate(&n_1))
.all(|a| {
let mut x = a.mod_pow(&d, &n);
let is_witness = {
if x == one || x == n_1 {
true
} else {
let mut r = r.clone();
loop {
x = x.mod_pow(&two, &n);
if x == one {
break false;
}
if x == n_1 {
break true;
}
if r == zero {
break false;
}
r -= &one;
}
}
};
is_witness
})
} |
#[cfg(all(not(target_arch = "wasm32"), test))]
mod test;
use liblumen_alloc::erts::exception;
use liblumen_alloc::erts::process::Process;
use liblumen_alloc::erts::term::prelude::Term;
use crate::erlang::charlist_to_string::charlist_to_string;
use crate::erlang::string_to_float::string_to_float;
#[native_implemented::function(erlang:list_to_float/1)]
pub fn result(process: &Process, list: Term) -> exception::Result<Term> {
let string = charlist_to_string(list)?;
string_to_float(process, "list", list, &string).map_err(From::from)
}
|
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern {
#[wasm_bindgen(js_namespace = console)]
fn log(s: &str);
fn func1(s: &str);
}
#[wasm_bindgen(module = "/src-js/func.js")]
extern {
fn func2(s: &str);
}
#[wasm_bindgen]
pub fn run(msg: &str) {
log(msg);
func1(msg);
func2(msg);
}
|
use super::*;
pub fn login_config(cfg: &mut web::ServiceConfig) {
cfg.service(do_login_phone)
.service(do_login_refresh)
.service(do_login_status)
.service(do_logout);
}
#[get("/login")]
async fn do_login(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {
let mut query = req.query();
if let Some(cookie) = query["cookie"].as_object_mut() {
cookie.insert("os".to_string(), Value::String("pc".to_string()));
} else {
query["cookie"] = json!({
"os":"pc"
});
}
let mut data: Value = json!({
"phone":query["email"],
"password":md5::compute(&query["password"].to_string()).to_hex(),
"rememberLogin":"true",
});
let mut options = json!({
"crypto": "weapi",
"ua":"pc",
"cookie":query["cookie"],
"proxy":query["proxy"],
"realIp":query["realIp"],
});
let mut url = "https://music.163.com/weapi/login".to_string();
ForwordRequest::new("login")
.forward(Method::POST, &mut url, &mut data, &mut options, req, stream)
.await
}
#[get("/login/cellphone")]
async fn do_login_phone(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {
let mut query = req.query();
if let Some(cookie) = query["cookie"].as_object_mut() {
cookie.insert("os".to_string(), Value::String("pc".to_string()));
} else {
query["cookie"] = json!({
"os":"pc"
});
}
if query["countrycode"].is_null() {
query["countrycode"] = Value::String("86".to_string());
}
let mut data: Value = json!({
"phone":query["phone"],
"countrycode":query["countrycode"],
"password":md5::compute(query["password"].as_str().unwrap()).to_hex(),
"rememberLogin":"true",
});
let mut options = json!({
"crypto": "weapi",
"ua":"pc",
"cookie":query["cookie"],
"proxy":query["proxy"],
"realIp":query["realIp"],
});
let mut url = "https://music.163.com/weapi/login/cellphone".to_string();
ForwordRequest::new("login")
.forward(Method::POST, &mut url, &mut data, &mut options, req, stream)
.await
}
#[get("/login/refresh")]
async fn do_login_refresh(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {
let mut query = req.query();
if let Some(cookie) = query["cookie"].as_object_mut() {
cookie.insert("os".to_string(), Value::String("pc".to_string()));
} else {
query["cookie"] = json!({
"os":"pc"
});
}
let mut data: Value = Value::Null;
let mut options = json!({
"crypto": "weapi",
"ua":"pc",
"cookie":query["cookie"],
"proxy":query["proxy"],
"realIp":query["realIp"],
});
let mut url = "https://music.163.com/weapi/login/token/refresh".to_string();
ForwordRequest::new("do_login_refresh")
.forward(Method::POST, &mut url, &mut data, &mut options, req, stream)
.await
}
#[get("/login/status")]
async fn do_login_status(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {
let mut query = req.query();
if let Some(cookie) = query["cookie"].as_object_mut() {
cookie.insert("os".to_string(), Value::String("pc".to_string()));
} else {
query["cookie"] = json!({
"os":"pc"
});
}
let mut data: Value = Value::Null;
let mut options = json!({
"crypto": "weapi",
"ua":"pc",
"cookie":query["cookie"],
"proxy":query["proxy"],
"realIp":query["realIp"],
});
let mut url = "https://music.163.com".to_string();
ForwordRequest::new("do_login_status")
.forward(Method::GET, &mut url, &mut data, &mut options, req, stream)
.await
}
#[get("/logout")]
async fn do_logout(req: HttpRequest, stream: web::Payload) -> Result<HttpResponse, Error> {
let mut query = req.query();
if let Some(cookie) = query["cookie"].as_object_mut() {
cookie.insert("os".to_string(), Value::String("pc".to_string()));
} else {
query["cookie"] = json!({
"os":"pc"
});
}
let mut data: Value = Value::Null;
let mut options = json!({
"crypto": "weapi",
"ua":"pc",
"cookie":query["cookie"],
"proxy":query["proxy"],
"realIp":query["realIp"],
});
let mut url = "https://music.163.com/weapi/logout".to_string();
ForwordRequest::new("do_login_status")
.forward(Method::POST, &mut url, &mut data, &mut options, req, stream)
.await
}
|
///! Filter code generation.
use crate::ir;
use crate::print;
use crate::print::ast::{self, Context};
use crate::print::value_set;
use log::trace;
use proc_macro2::{Ident, Span, TokenStream};
use quote;
use serde::Serialize;
use utils::unwrap;
/// Ast for a filtering funtion.
#[derive(Serialize)]
pub struct Filter<'a> {
id: usize,
arguments: Vec<(ast::Variable<'a>, ast::Set<'a>)>,
type_name: ast::ValueType,
bindings: Vec<(ast::Variable<'a>, ast::ChoiceInstance<'a>)>,
body: PositiveFilter<'a>,
}
impl<'a> Filter<'a> {
pub fn new(
filter: &'a ir::Filter,
id: usize,
choice: &'a ir::Choice,
ir_desc: &'a ir::IrDesc,
) -> Self {
trace!("filter {}_{}", choice.name(), id);
let arguments = &filter.arguments[choice.arguments().len()..];
let ctx = &Context::new(ir_desc, choice, arguments, &filter.inputs);
let arguments = filter
.arguments
.iter()
.enumerate()
.map(|(pos, t)| {
let var = if pos < choice.arguments().len() {
ir::Variable::Arg(pos)
} else {
ir::Variable::Forall(pos - choice.arguments().len())
};
(ctx.var_name(var), ast::Set::new(t, ctx))
})
.collect();
let bindings = filter
.inputs
.iter()
.enumerate()
.map(|(id, input)| {
(ctx.input_name(id), ast::ChoiceInstance::new(input, &ctx))
})
.collect();
let values_var = ast::Variable::with_name("values");
let body = PositiveFilter::new(&filter.rules, choice, &ctx, values_var.clone());
let type_name = ast::ValueType::new(choice.value_type().full_type(), ctx);
Filter {
id,
arguments,
body,
bindings,
type_name,
}
}
}
/// A filter that enables values.
#[derive(Serialize)]
enum PositiveFilter<'a> {
Switch {
var: ast::Variable<'a>,
cases: Vec<(String, PositiveFilter<'a>)>,
},
AllowValues {
var: ast::Variable<'a>,
values: String,
},
AllowAll {
var: ast::Variable<'a>,
value_type: ast::ValueType,
},
Rules {
value_type: ast::ValueType,
old_var: ast::Variable<'a>,
new_var: ast::Variable<'a>,
rules: Vec<Rule<'a>>,
},
Empty,
}
impl<'a> PositiveFilter<'a> {
/// Creates a `PositiveFilter` enforcing a set of rules.
fn rules(
rules: &'a [ir::Rule],
choice: &'a ir::Choice,
ctx: &Context<'a>,
var: ast::Variable<'a>,
) -> Self {
let value_type = ast::ValueType::new(choice.value_type().full_type(), ctx);
match *rules {
[] => PositiveFilter::AllowAll { var, value_type },
[ref r] if r.conditions.is_empty() && r.set_constraints.is_empty() => {
if r.alternatives.is_empty() {
PositiveFilter::Empty
} else {
let values = value_set::print(&r.alternatives, ctx).to_string();
PositiveFilter::AllowValues { var, values }
}
}
ref rules => {
let new_var = ast::Variable::with_prefix("values");
let rules = rules
.iter()
.map(|r| Rule::new(new_var.clone(), r, ctx))
.collect();
PositiveFilter::Rules {
value_type,
old_var: var,
new_var,
rules,
}
}
}
}
/// Create a PositiveFilter from an ir::SubFilter.
fn new(
filter: &'a ir::SubFilter,
choice: &'a ir::Choice,
ctx: &Context<'a>,
set: ast::Variable<'a>,
) -> Self {
match *filter {
ir::SubFilter::Rules(ref rules) => {
PositiveFilter::rules(rules, choice, ctx, set)
}
ir::SubFilter::Switch { switch, ref cases } => {
let cases = cases
.iter()
.map(|&(ref values, ref sub_filter)| {
let sub_filter =
PositiveFilter::new(sub_filter, choice, ctx, set.clone());
(value_set::print(values, ctx).to_string(), sub_filter)
})
.collect();
PositiveFilter::Switch {
var: ctx.input_name(switch),
cases,
}
}
}
}
}
#[derive(Serialize)]
pub struct Rule<'a> {
var: ast::Variable<'a>,
conditions: Vec<String>,
set_conditions: Vec<ast::SetConstraint<'a>>,
values: String,
}
impl<'a> Rule<'a> {
pub fn new(
var: ast::Variable<'a>,
rule: &'a ir::Rule,
ctx: &Context<'a>,
) -> Rule<'a> {
let values = value_set::print(&rule.alternatives, ctx).to_string();
let conditions = rule
.conditions
.iter()
.map(|c| condition(c, ctx).to_string())
.collect();
let set_conditions = ast::SetConstraint::new(&rule.set_constraints, ctx);
Rule {
var,
conditions,
set_conditions,
values,
}
}
}
/// Prints an `ir::Condition`.
pub fn condition(cond: &ir::Condition, ctx: &Context) -> TokenStream {
match cond {
ir::Condition::Bool(b) => quote::quote!(#b),
ir::Condition::Code { code, negate } => {
let mut code = print::Value::new_const(code, ctx);
if *negate {
code.negate();
}
quote::quote!(#code)
}
ir::Condition::Enum {
input,
values,
negate,
inverse,
} => {
let input = ctx.input(*input);
let enum_def = ctx.ir_desc.get_enum(unwrap!(input.value_type().as_enum()));
let set = ir::normalized_enum_set(values, !*negate, *inverse, enum_def);
let value_set = value_set::print(&set, ctx);
quote::quote!(!#input.intersects(#value_set))
}
ir::Condition::CmpCode { lhs, rhs, op } => {
let rhs = print::Value::new_const(rhs, ctx);
comparison(*op, &ctx.input(*lhs).clone().into(), &rhs, ctx)
}
ir::Condition::CmpInput {
lhs,
rhs,
op,
inverse,
} => {
let mut rhs: print::Value = ctx.input(*rhs).clone().into();
if *inverse {
rhs.inverse()
}
comparison(*op, &ctx.input(*lhs).clone().into(), &rhs, ctx)
}
}
}
/// Produces code that compares to domains.
fn comparison(
op: ir::CmpOp,
lhs: &print::Value,
rhs: &print::Value,
ctx: &Context,
) -> TokenStream {
let lhs_universe = print::value::universe(lhs.value_type(), ctx);
let rhs_universe = print::value::universe(rhs.value_type(), ctx);
quote::quote!(#lhs.#op(#lhs_universe, #rhs, #rhs_universe))
}
impl quote::ToTokens for ir::CmpOp {
fn to_tokens(&self, stream: &mut TokenStream) {
let name = match self {
ir::CmpOp::Eq => "is_eq",
ir::CmpOp::Neq => "is_neq",
ir::CmpOp::Lt => "is_lt",
ir::CmpOp::Gt => "is_gt",
ir::CmpOp::Leq => "is_leq",
ir::CmpOp::Geq => "is_geq",
};
// TODO(span): get the real span from the lexer
Ident::new(name, Span::call_site()).to_tokens(stream);
}
}
|
#![feature(try_blocks)]
#[macro_use]
extern crate clap;
use clap::{App, Arg};
use rusoto_core::Region;
use std::collections::HashMap;
use std::fs::{File, OpenOptions};
use std::io::BufReader;
use std::io::{self, prelude::*};
use std::{fmt, thread, time};
use tsunami::*;
const AMI: &str = "ami-04db1e82afa245def";
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
enum Backend {
Mysql,
Noria,
Natural,
}
impl fmt::Display for Backend {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
match *self {
Backend::Mysql => write!(f, "mysql"),
Backend::Noria => write!(f, "noria"),
Backend::Natural => write!(f, "natural"),
}
}
}
impl Backend {
fn queries(&self) -> &'static str {
match *self {
Backend::Mysql => "original",
Backend::Noria => "noria",
Backend::Natural => "natural",
}
}
}
fn git_and_cargo(
ssh: &mut Session,
dir: &str,
bin: &str,
branch: Option<&str>,
) -> Result<(), failure::Error> {
eprintln!(" -> git reset");
ssh.cmd(&format!("bash -c 'git -C {} reset --hard 2>&1'", dir))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() && !out.contains("Already up-to-date.") {
eprintln!("{}", out);
}
})?;
if let Some(branch) = branch {
eprintln!(" -> git checkout {}", branch);
ssh.cmd(&format!(
"bash -c 'git -C {} checkout {} 2>&1'",
dir, branch
))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!("{}", out);
}
})?;
}
eprintln!(" -> git update");
ssh.cmd(&format!("bash -c 'git -C {} pull 2>&1'", dir))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() && !out.contains("Already up-to-date.") {
eprintln!("{}", out);
}
})?;
if dir == "shim" {
eprintln!(" -> force local noria");
ssh.cmd(&format!("sed -i -e 's/^###//g' {}/Cargo.toml", dir))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!("{}", out);
}
})?;
}
if !bin.is_empty() {
let cmd = if dir.starts_with("benchmarks") {
eprintln!(" -> rebuild (unshared)");
format!(
"bash -c 'cd {} && env -u CARGO_TARGET_DIR cargo b --release --bin {} 2>&1'",
dir, bin
)
} else {
eprintln!(" -> rebuild");
format!(
"bash -c 'cd {} && cargo b --release --bin {} 2>&1'",
dir, bin
)
};
ssh.cmd(&cmd)
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!("{}", out);
}
})
.map_err(|e| {
eprintln!(" -> rebuild failed!\n{:?}", e);
e
})?;
}
Ok(())
}
fn main() {
let args = App::new("noria lobsters ec2 orchestrator")
.about("Run the noria lobste.rs benchmark on ec2")
.arg(
Arg::with_name("memory_limit")
.takes_value(true)
.long("memory-limit")
.help("Partial state size limit / eviction threshold [in bytes]."),
)
.arg(
Arg::with_name("memscale")
.takes_value(true)
.default_value("1.0")
.long("memscale")
.help("Memory scale factor for workload"),
)
.arg(
Arg::with_name("availability_zone")
.long("availability-zone")
.value_name("AZ")
.default_value("us-east-1c")
.takes_value(true)
.help("EC2 availability zone to use for launching instances"),
)
.arg(
Arg::with_name("branch")
.takes_value(true)
.default_value("master")
.long("branch")
.help("Which branch of noria to benchmark"),
)
.arg(
Arg::with_name("SCALE")
.help("Run the given scale(s).")
.multiple(true),
)
.get_matches();
let az = args.value_of("availability_zone").unwrap();
let mut b = TsunamiBuilder::default();
b.set_region(Region::UsEast1);
b.set_availability_zone(az);
b.use_term_logger();
let branch = args.value_of("branch").map(String::from);
b.add_set(
"trawler",
1,
MachineSetup::new("m5.24xlarge", AMI, move |ssh| {
eprintln!("==> setting up benchmark client");
git_and_cargo(
ssh,
"noria",
"lobsters",
branch.as_ref().map(String::as_str),
)?;
eprintln!("==> setting up shim");
git_and_cargo(ssh, "shim", "noria-mysql", None)?;
Ok(())
})
.as_user("ubuntu"),
);
let branch = args.value_of("branch").map(String::from);
b.add_set(
"server",
1,
MachineSetup::new("c5d.4xlarge", AMI, move |ssh| {
eprintln!("==> setting up noria-server");
git_and_cargo(
ssh,
"noria",
"noria-server",
branch.as_ref().map(String::as_str),
)?;
eprintln!("==> setting up noria-zk");
git_and_cargo(
ssh,
"noria",
"noria-zk",
branch.as_ref().map(String::as_str),
)?;
// we'll need zookeeper running
ssh.cmd("sudo systemctl start zookeeper")?;
Ok(())
})
.as_user("ubuntu"),
);
// https://github.com/rusoto/rusoto/blob/master/AWS-CREDENTIALS.md
//let sts = rusoto_sts::StsClient::new(rusoto_core::Region::EuCentral1);
let sts = rusoto_sts::StsClient::new(rusoto_core::Region::UsEast1);
let provider = rusoto_sts::StsAssumeRoleSessionCredentialsProvider::new(
sts,
"arn:aws:sts::125163634912:role/soup".to_owned(),
"vote-benchmark".to_owned(),
None,
None,
None,
None,
);
b.set_max_duration(4);
//b.set_region(rusoto_core::Region::EuCentral1);
b.set_region(rusoto_core::Region::UsEast1);
b.set_availability_zone("us-east-1a");
b.wait_limit(time::Duration::from_secs(60));
let scales = args
.values_of("SCALE")
.map(|it| it.map(|s| s.parse().unwrap()).collect())
.unwrap_or_else(|| {
vec![
100usize, 500, 1000, 1250, 1500, 1750, 2000, 2500, 2750, 3000, 3500, 4500, 5500,
6500, 7000, 7500, 8000, 8500, 9000, 9500, 10_000,
]
});
let memscale = value_t_or_exit!(args, "memscale", f64);
let memlimit = args.value_of("memory_limit");
let mut load = if args.is_present("SCALE") {
OpenOptions::new()
.write(true)
.truncate(false)
.append(true)
.create(true)
.open("load.log")
.unwrap()
} else {
let mut f = File::create("load.log").unwrap();
f.write_all(b"#reqscale backend sload1 sload5 cload1 cload5\n")
.unwrap();
f
};
b.run_as(provider, |mut vms: HashMap<String, Vec<Machine>>| {
use chrono::prelude::*;
let mut server = vms.remove("server").unwrap().swap_remove(0);
let mut trawler = vms.remove("trawler").unwrap().swap_remove(0);
// write out host files for ergonomic ssh
let r: io::Result<()> = try {
let mut f = File::create("server.host")?;
writeln!(f, "ubuntu@{}", server.public_dns)?;
let mut f = File::create("client.host")?;
writeln!(f, "ubuntu@{}", trawler.public_dns)?;
};
if let Err(e) = r {
eprintln!("failed to write out host files: {:?}", e);
}
let backends = [Backend::Mysql, Backend::Noria, Backend::Natural];
// allow reuse of time-wait ports
trawler
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'echo 1 | sudo tee /proc/sys/net/ipv4/tcp_tw_reuse'")?;
for backend in &backends {
let mut survived_last = true;
for &scale in &scales {
if !survived_last {
break;
}
eprintln!("==> benchmark {} w/ {}x load", backend, scale);
match backend {
Backend::Mysql => {
let ssh = server.ssh.as_mut().unwrap();
ssh.cmd("sudo mount -t tmpfs -o size=16G tmpfs /mnt")?;
ssh.cmd("sudo cp -r /var/lib/mysql.clean /mnt/mysql")?;
ssh.cmd("sudo rm -rf /var/lib/mysql")?;
ssh.cmd("sudo ln -sfn /mnt/mysql /var/lib/mysql")?;
ssh.cmd("sudo chown -R mysql:mysql /var/lib/mysql/")?;
}
Backend::Noria | Backend::Natural => {
// just to make totally sure
server
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'pkill -9 -f noria-server 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> force stopped noria...\n{}", out);
}
})?;
trawler
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'pkill -9 -f noria-mysql 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> force stopped shim...\n{}", out);
}
})?;
// XXX: also delete log files if we later run with RocksDB?
server
.ssh
.as_mut()
.unwrap()
.cmd(
"~/target/release/noria-zk \
--clean --deployment trawler",
)
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> wiped noria state...\n{}", out);
}
})?;
// Don't hit Noria listening timeout think
thread::sleep(time::Duration::from_secs(10));
}
}
// start server again
match backend {
Backend::Mysql => server
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'sudo systemctl start mariadb 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> started mysql...\n{}", out);
}
})?,
Backend::Noria | Backend::Natural => {
let mut cmd = format!(
"bash -c 'nohup \
env \
RUST_BACKTRACE=1 \
~/target/release/noria-server \
--deployment trawler \
--durability memory \
--no-reuse \
--address {} \
--shards 0 ",
server.private_ip
);
if let Some(memlimit) = memlimit {
cmd.push_str(&format!("--memory {} ", memlimit));
}
cmd.push_str(" &> noria-server.log &'");
server.ssh.as_mut().unwrap().cmd(&cmd).map(|_| ())?;
// start the shim (which will block until noria is available)
trawler
.ssh
.as_mut()
.unwrap()
.cmd(&format!(
"bash -c 'nohup \
env RUST_BACKTRACE=1 \
~/target/release/noria-mysql \
--deployment trawler \
--no-sanitize --no-static-responses \
-z {}:2181 \
-p 3306 \
&> shim.log &'",
server.private_ip,
))
.map(|_| ())?;
// give noria a chance to start
thread::sleep(time::Duration::from_secs(5));
}
}
// run priming
// XXX: with MySQL we *could* just reprime by copying over the old ramdisk again
eprintln!(" -> priming at {}", Local::now().time().format("%H:%M:%S"));
let ip = match backend {
Backend::Mysql => &*server.private_ip,
Backend::Noria | Backend::Natural => "127.0.0.1",
};
trawler
.ssh
.as_mut()
.unwrap()
.cmd(&format!(
"env RUST_BACKTRACE=1 \
~/target/release/lobsters \
--memscale {} \
--warmup 0 \
--runtime 0 \
--issuers 24 \
--prime \
--queries {} \
\"mysql://lobsters:$(cat ~/mysql.pass)@{}/lobsters\" \
2>&1",
memscale,
backend.queries(),
ip
))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> priming finished...\n{}", out);
}
})?;
eprintln!(" -> warming at {}", Local::now().time().format("%H:%M:%S"));
trawler
.ssh
.as_mut()
.unwrap()
.cmd(&format!(
"env RUST_BACKTRACE=1 \
~/target/release/lobsters \
--reqscale 3000 \
--memscale {} \
--warmup 120 \
--runtime 0 \
--issuers 24 \
--queries {} \
\"mysql://lobsters:$(cat ~/mysql.pass)@{}/lobsters\" \
2>&1",
memscale,
backend.queries(),
ip
))
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> warming finished...\n{}", out);
}
})?;
eprintln!(" -> started at {}", Local::now().time().format("%H:%M:%S"));
let prefix = format!("lobsters-{}-{}", backend, scale);
let mut output = File::create(format!("{}.log", prefix))?;
let hist_output = if let Some(memlimit) = memlimit {
format!(
"--histogram lobsters-{}-m{}-r{}-l{}.hist ",
backend, memscale, scale, memlimit
)
} else {
format!(
"--histogram lobsters-{}-m{}-r{}-unlimited.hist ",
backend, memscale, scale
)
};
trawler
.ssh
.as_mut()
.unwrap()
.cmd_raw(&format!(
"env RUST_BACKTRACE=1 \
~/target/release/lobsters \
--reqscale {} \
--memscale {} \
--warmup 20 \
--runtime 30 \
--issuers 24 \
--queries {} \
{} \
\"mysql://lobsters:$(cat ~/mysql.pass)@{}/lobsters\" \
2> run.err",
scale,
memscale,
backend.queries(),
hist_output,
ip
))
.and_then(|out| Ok(output.write_all(&out[..]).map(|_| ())?))?;
drop(output);
eprintln!(" -> finished at {}", Local::now().time().format("%H:%M:%S"));
// gather server load
let sload = server
.ssh
.as_mut()
.unwrap()
.cmd("awk '{print $1\" \"$2}' /proc/loadavg")?;
let sload = sload.trim_end();
// gather client load
let cload = trawler
.ssh
.as_mut()
.unwrap()
.cmd("awk '{print $1\" \"$2}' /proc/loadavg")?;
let cload = cload.trim_end();
load.write_all(format!("{} {} ", scale, backend).as_bytes())?;
load.write_all(sload.as_bytes())?;
load.write_all(b" ")?;
load.write_all(cload.as_bytes())?;
load.write_all(b"\n")?;
let mut hist = File::create(format!("{}.hist", prefix))?;
let hist_cmd = if let Some(memlimit) = memlimit {
format!(
"cat lobsters-{}-m{}-r{}-l{}.hist",
backend, memscale, scale, memlimit
)
} else {
format!(
"cat lobsters-{}-m{}-r{}-unlimited.hist",
backend, memscale, scale
)
};
trawler
.ssh
.as_mut()
.unwrap()
.cmd_raw(&hist_cmd)
.and_then(|out| Ok(hist.write_all(&out[..]).map(|_| ())?))?;
// stop old server
match backend {
Backend::Mysql => {
server
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'sudo systemctl stop mariadb 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> stopped mysql...\n{}", out);
}
})?;
server.ssh.as_mut().unwrap().cmd("sudo umount /mnt")?;
}
Backend::Noria | Backend::Natural => {
// gather state size
let mem_limit = if let Some(limit) = memlimit {
format!("l{}", limit)
} else {
"unlimited".to_owned()
};
let mut sizefile = File::create(format!(
"lobsters-{}-m{}-r{}-{}.json",
backend, memscale, scale, mem_limit
))?;
trawler
.ssh
.as_mut()
.unwrap()
.cmd_raw(&format!(
"wget http://{}:9000/get_statistics",
server.private_ip
))
.and_then(|out| Ok(sizefile.write_all(&out[..]).map(|_| ())?))?;
server
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'pkill -f noria-server 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> stopped noria...\n{}", out);
}
})?;
trawler
.ssh
.as_mut()
.unwrap()
.cmd("bash -c 'pkill -f noria-mysql 2>&1'")
.map(|out| {
let out = out.trim_end();
if !out.is_empty() {
eprintln!(" -> stopped shim...\n{}", out);
}
})?;
// give it some time
thread::sleep(time::Duration::from_secs(2));
}
}
// stop iterating through scales for this backend if it's not keeping up
let sload: f64 = sload
.split_whitespace()
.next()
.and_then(|l| l.parse().ok())
.unwrap_or(0.0);
let cload: f64 = cload
.split_whitespace()
.next()
.and_then(|l| l.parse().ok())
.unwrap_or(0.0);
eprintln!(" -> backend load: s: {}/16, c: {}/48", sload, cload);
if sload > 16.5 {
eprintln!(" -> backend is probably not keeping up");
}
// also parse achived ops/s to check that we're *really* keeping up
let log = File::open(format!("{}.log", prefix))?;
let log = BufReader::new(log);
let mut target = None;
let mut actual = None;
for line in log.lines() {
let line = line?;
if line.starts_with("# target ops/s") {
target = Some(line.rsplitn(2, ' ').next().unwrap().parse::<f64>()?);
} else if line.starts_with("# achieved ops/s") {
actual = Some(line.rsplitn(2, ' ').next().unwrap().parse::<f64>()?);
}
match (target, actual) {
(Some(target), Some(actual)) => {
eprintln!(" -> achieved {} ops/s (target: {})", actual, target);
if actual < target * 3.0 / 4.0 {
eprintln!(" -> backend is really not keeping up");
survived_last = false;
}
break;
}
_ => {}
}
}
}
}
Ok(())
})
.unwrap();
}
|
// Copyright 2020 IOTA Stiftung
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and limitations under the License.
use crate::ternary::{
wots::{Error as WotsError, WotsPrivateKey, WotsSecurityLevel},
PrivateKeyGenerator, SIGNATURE_FRAGMENT_LENGTH,
};
use bee_crypto::ternary::{
bigint::{binary_representation::U8Repr, endianness::BigEndian, I384, T242, T243},
sponge::Sponge,
HASH_LENGTH,
};
use bee_ternary::{Btrit, T1B1Buf, TritBuf, Trits, T1B1};
use sha3::{
digest::{ExtendableOutput, Update, XofReader},
Shake256,
};
use std::marker::PhantomData;
/// Shake-based Winternitz One Time Signature private key generator builder.
#[derive(Default)]
pub struct WotsShakePrivateKeyGeneratorBuilder<S> {
security_level: Option<WotsSecurityLevel>,
_sponge: PhantomData<S>,
}
impl<S: Sponge + Default> WotsShakePrivateKeyGeneratorBuilder<S> {
/// Sets the security level of the private key.
pub fn with_security_level(mut self, security_level: WotsSecurityLevel) -> Self {
self.security_level.replace(security_level);
self
}
/// Builds the private key generator.
pub fn build(self) -> Result<WotsShakePrivateKeyGenerator<S>, WotsError> {
Ok(WotsShakePrivateKeyGenerator {
security_level: self.security_level.ok_or(WotsError::MissingSecurityLevel)?,
_sponge: PhantomData,
})
}
}
/// Shake-based Winternitz One Time Signature private key generator.
pub struct WotsShakePrivateKeyGenerator<S> {
security_level: WotsSecurityLevel,
_sponge: PhantomData<S>,
}
impl<S: Sponge + Default> PrivateKeyGenerator for WotsShakePrivateKeyGenerator<S> {
type PrivateKey = WotsPrivateKey<S>;
type Error = WotsError;
/// Derives a private key from entropy using the SHAKE256 extendable-output function.
/// The entropy must be a slice of exactly 243 trits where the last trit is zero.
/// Derives its security assumptions from the properties of the underlying SHAKE function.
fn generate_from_entropy(&self, entropy: &Trits<T1B1>) -> Result<Self::PrivateKey, Self::Error> {
if entropy.len() != HASH_LENGTH {
return Err(WotsError::InvalidEntropyLength(entropy.len()));
}
if entropy[HASH_LENGTH - 1] != Btrit::Zero {
return Err(WotsError::NonNullEntropyLastTrit);
}
let mut state = TritBuf::<T1B1Buf>::zeros(self.security_level as usize * SIGNATURE_FRAGMENT_LENGTH);
let mut shake = Shake256::default();
let mut ternary_buffer = T243::<Btrit>::default();
ternary_buffer.copy_from(entropy);
let mut binary_buffer: I384<BigEndian, U8Repr> = ternary_buffer.into_t242().into();
shake.update(&binary_buffer[..]);
let mut reader = shake.finalize_xof();
for chunk in state.chunks_mut(HASH_LENGTH) {
reader.read(&mut binary_buffer[..]);
ternary_buffer = T242::from_i384_ignoring_mst(binary_buffer).into_t243();
chunk.copy_from(&ternary_buffer);
}
Ok(Self::PrivateKey {
state,
sponge: PhantomData,
})
}
}
|
use alloc::string::String;
use alloc::vec::Vec;
#[derive(Debug, PartialEq)]
pub struct Abi {
pub version: String,
pub types: Vec<AbiType>,
pub structs: Vec<AbiStruct>,
pub actions: Vec<AbiAction>,
pub tables: Vec<AbiTable>,
pub ricardian_clauses: Vec<AbiRicardianClause>,
pub error_messages: Vec<AbiErrorMessage>,
pub abi_extensions: Vec<AbiExtension>,
// TODO variants: Vec<Variant>,
}
#[derive(Debug, PartialEq)]
pub struct AbiType {
pub new_type_name: String,
pub type_: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiStruct {
pub name: String,
pub base: String,
pub fields: Vec<AbiField>,
}
#[derive(Debug, PartialEq)]
pub struct AbiField {
pub name: String,
pub type_: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiAction {
pub name: String,
pub type_: String,
pub ricardian_contract: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiTable {
pub name: String,
pub index_type: String,
pub key_names: Vec<String>,
pub key_types: Vec<String>,
pub type_: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiRicardianClause {
pub id: String,
pub body: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiErrorMessage {
pub error_code: u64,
pub error_msg: String,
}
#[derive(Debug, PartialEq)]
pub struct AbiExtension {
pub type_: u16,
pub data: String,
}
|
mod hpa_map;
pub use self::hpa_map::HPAMap;
mod inter_link;
pub use self::inter_link::{InterLink, LinkId};
mod chunk;
pub use self::chunk::{Chunk, CHUNK_SIZE};
|
use crate::model::map::Gold;
use crate::model::map::MapSection;
use crate::model::miner::MinerId;
pub type RoundResults = (MinerId,Gold,Gold);
#[derive(Debug, Clone)]
pub enum MiningMessage {
Start(MapSection),
Stop,
ResultsNotification(RoundResults),
ILeft(MinerId),
TransferGold(Gold),
ByeBye,
Ready(MinerId)
}
|
mod front_of_house;
mod back_of_house {
use crate::front_of_house::serving::take_payment;
pub fn fix_incorrect_order() {
super::front_of_house::serving::serve_order();
take_payment();
}
}
pub use back_of_house::fix_incorrect_order;
pub fn eat_at_restaurant() {
front_of_house::hosting::add_to_waitlist();
crate::front_of_house::hosting::add_to_waitlist();
fix_incorrect_order();
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}
|
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::env;
use std::fs;
use std::io::{self, Read};
use std::ops::Deref;
use std::path::PathBuf;
use csv;
use csv::index::Indexed;
use rustc_serialize::{Decodable, Decoder};
use CliResult;
use select::{SelectColumns, Selection, NormalSelection};
use util;
#[derive(Clone, Copy, Debug)]
pub struct Delimiter(pub u8);
/// Delimiter represents values that can be passed from the command line that
/// can be used as a field delimiter in CSV data.
///
/// Its purpose is to ensure that the Unicode character given decodes to a
/// valid ASCII character as required by the CSV parser.
impl Delimiter {
pub fn as_byte(self) -> u8 {
self.0
}
}
impl Decodable for Delimiter {
fn decode<D: Decoder>(d: &mut D) -> Result<Delimiter, D::Error> {
let c = try!(d.read_str());
match &*c {
r"\t" => Ok(Delimiter(b'\t')),
s => {
if s.len() != 1 {
let msg = format!("Could not convert '{}' to a single \
ASCII character.", s);
return Err(d.error(&*msg));
}
let c = s.chars().next().unwrap();
if c.is_ascii() {
Ok(Delimiter(c as u8))
} else {
let msg = format!("Could not convert '{}' \
to ASCII delimiter.", c);
Err(d.error(&*msg))
}
}
}
}
}
pub struct Config {
path: Option<PathBuf>, // None implies <stdin>
idx_path: Option<PathBuf>,
select_columns: Option<SelectColumns>,
delimiter: u8,
pub no_headers: bool,
flexible: bool,
crlf: bool,
}
impl Config {
pub fn new(path: &Option<String>) -> Config {
let (path, delim) = match *path {
None => (None, b','),
Some(ref s) if s.deref() == "-" => (None, b','),
Some(ref s) => {
let path = PathBuf::from(s);
let delim =
if path.extension().map_or(false, |v| v == "tsv") {
b'\t'
} else {
b','
};
(Some(path), delim)
}
};
Config {
path: path,
idx_path: None,
select_columns: None,
delimiter: delim,
no_headers: false,
flexible: false,
crlf: false,
}
}
pub fn delimiter(mut self, d: Option<Delimiter>) -> Config {
if let Some(d) = d {
self.delimiter = d.as_byte();
}
self
}
pub fn no_headers(mut self, mut yes: bool) -> Config {
if env::var("XSV_TOGGLE_HEADERS").unwrap_or("0".to_owned()) == "1" {
yes = !yes;
}
self.no_headers = yes;
self
}
pub fn flexible(mut self, yes: bool) -> Config {
self.flexible = yes;
self
}
pub fn crlf(mut self, yes: bool) -> Config {
self.crlf = yes;
self
}
pub fn select(mut self, sel_cols: SelectColumns) -> Config {
self.select_columns = Some(sel_cols);
self
}
pub fn is_std(&self) -> bool {
self.path.is_none()
}
pub fn selection(&self, first_record: &[csv::ByteString])
-> Result<Selection, String> {
match self.select_columns {
None => Err("Config has no 'SelectColums'. Did you call \
Config::select?".to_owned()),
Some(ref sel) => sel.selection(first_record, !self.no_headers),
}
}
pub fn normal_selection(&self, first_record: &[csv::ByteString])
-> Result<NormalSelection, String> {
self.selection(first_record).map(|sel| sel.normal())
}
pub fn write_headers<R: io::Read, W: io::Write>
(&self, r: &mut csv::Reader<R>, w: &mut csv::Writer<W>)
-> csv::Result<()> {
if !self.no_headers {
let r = try!(r.byte_headers());
if !r.is_empty() {
try!(w.write(r.into_iter()));
}
}
Ok(())
}
pub fn writer(&self)
-> io::Result<csv::Writer<Box<io::Write+'static>>> {
Ok(self.from_writer(try!(self.io_writer())))
}
pub fn reader(&self)
-> io::Result<csv::Reader<Box<io::Read+'static>>> {
Ok(self.from_reader(try!(self.io_reader())))
}
pub fn reader_file(&self) -> io::Result<csv::Reader<fs::File>> {
match self.path {
None => Err(io::Error::new(
io::ErrorKind::Other, "Cannot use <stdin> here",
)),
Some(ref p) => fs::File::open(p).map(|f| self.from_reader(f)),
}
}
pub fn index_files(&self)
-> io::Result<Option<(csv::Reader<fs::File>, fs::File)>> {
let (csv_file, idx_file) = match (&self.path, &self.idx_path) {
(&None, &None) => return Ok(None),
(&None, &Some(_)) => return Err(io::Error::new(
io::ErrorKind::Other,
"Cannot use <stdin> with indexes",
// Some(format!("index file: {}", p.display()))
)),
(&Some(ref p), &None) => {
// We generally don't want to report an error here, since we're
// passively trying to find an index.
let idx_file = match fs::File::open(&util::idx_path(p)) {
// TODO: Maybe we should report an error if the file exists
// but is not readable.
Err(_) => return Ok(None),
Ok(f) => f,
};
(try!(fs::File::open(p)), idx_file)
}
(&Some(ref p), &Some(ref ip)) => {
(try!(fs::File::open(p)), try!(fs::File::open(ip)))
}
};
// If the CSV data was last modified after the index file was last
// modified, then return an error and demand the user regenerate the
// index.
let data_modified = util::last_modified(&try!(csv_file.metadata()));
let idx_modified = util::last_modified(&try!(idx_file.metadata()));
if data_modified > idx_modified {
return Err(io::Error::new(
io::ErrorKind::Other,
"The CSV file was modified after the index file. \
Please re-create the index.",
// Some(format!("CSV file: {}, index file: {}",
// csv_file.path().unwrap().to_string_lossy(),
// idx_file.path().unwrap().to_string_lossy())),
));
}
let csv_rdr = self.from_reader(csv_file);
Ok(Some((csv_rdr, idx_file)))
}
pub fn indexed(&self)
-> CliResult<Option<Indexed<fs::File, fs::File>>> {
match try!(self.index_files()) {
None => Ok(None),
Some((r, i)) => Ok(Some(try!(Indexed::open(r, i)))),
}
}
pub fn io_reader(&self) -> io::Result<Box<io::Read+'static>> {
Ok(match self.path {
None => Box::new(io::stdin()),
Some(ref p) => {
match fs::File::open(p){
Ok(x) => Box::new(x),
Err(err) => {
let msg = format!(
"failed to open {}: {}", p.display(), err);
return Err(io::Error::new(
io::ErrorKind::NotFound,
msg,
));
}
}
},
})
}
pub fn from_reader<R: Read>(&self, rdr: R) -> csv::Reader<R> {
csv::Reader::from_reader(rdr)
.flexible(self.flexible)
.delimiter(self.delimiter)
.has_headers(!self.no_headers)
}
pub fn io_writer(&self) -> io::Result<Box<io::Write+'static>> {
Ok(match self.path {
None => Box::new(io::stdout()),
Some(ref p) => Box::new(try!(fs::File::create(p))),
})
}
pub fn from_writer<W: io::Write>(&self, wtr: W) -> csv::Writer<W> {
let term = if self.crlf { csv::RecordTerminator::CRLF }
else { csv::RecordTerminator::Any(b'\n') };
csv::Writer::from_writer(wtr)
.flexible(self.flexible)
.delimiter(self.delimiter)
.record_terminator(term)
}
}
|
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use Span;
use rustc_errors as errors;
use syntax_pos::MultiSpan;
/// An enum representing a diagnostic level.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
#[derive(Copy, Clone, Debug)]
pub enum Level {
/// An error.
Error,
/// A warning.
Warning,
/// A note.
Note,
/// A help message.
Help,
#[doc(hidden)]
__Nonexhaustive,
}
/// A structure representing a diagnostic message and associated children
/// messages.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
#[derive(Clone, Debug)]
pub struct Diagnostic {
level: Level,
message: String,
span: Option<Span>,
children: Vec<Diagnostic>
}
macro_rules! diagnostic_child_methods {
($spanned:ident, $regular:ident, $level:expr) => (
/// Add a new child diagnostic message to `self` with the level
/// identified by this methods name with the given `span` and `message`.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn $spanned<T: Into<String>>(mut self, span: Span, message: T) -> Diagnostic {
self.children.push(Diagnostic::spanned(span, $level, message));
self
}
/// Add a new child diagnostic message to `self` with the level
/// identified by this method's name with the given `message`.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn $regular<T: Into<String>>(mut self, message: T) -> Diagnostic {
self.children.push(Diagnostic::new($level, message));
self
}
)
}
impl Diagnostic {
/// Create a new diagnostic with the given `level` and `message`.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic {
Diagnostic {
level: level,
message: message.into(),
span: None,
children: vec![]
}
}
/// Create a new diagnostic with the given `level` and `message` pointing to
/// the given `span`.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn spanned<T: Into<String>>(span: Span, level: Level, message: T) -> Diagnostic {
Diagnostic {
level: level,
message: message.into(),
span: Some(span),
children: vec![]
}
}
diagnostic_child_methods!(span_error, error, Level::Error);
diagnostic_child_methods!(span_warning, warning, Level::Warning);
diagnostic_child_methods!(span_note, note, Level::Note);
diagnostic_child_methods!(span_help, help, Level::Help);
/// Returns the diagnostic `level` for `self`.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn level(&self) -> Level {
self.level
}
/// Emit the diagnostic.
#[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn emit(self) {
let level = self.level.to_internal();
let mut diag = errors::Diagnostic::new(level, &*self.message);
if let Some(span) = self.span {
diag.set_span(span.0);
}
for child in self.children {
let span = child.span.map_or(MultiSpan::new(), |s| s.0.into());
let level = child.level.to_internal();
diag.sub(level, &*child.message, span, None);
}
::__internal::with_sess(move |sess, _| {
errors::DiagnosticBuilder::new_diagnostic(&sess.span_diagnostic, diag).emit();
});
}
}
|
enum CanNeverExist {}
fn never_returns() -> CanNeverExist {
CanNeverExist {}
}
fn main() {
let value = never_returns();
} |
// Copyright 2022 Datafuse Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use std::collections::HashMap;
use std::collections::HashSet;
use common_exception::ErrorCode;
use common_exception::Result;
use common_exception::Span;
use common_expression::type_check::common_super_type;
use common_expression::types::DataType;
use common_functions::BUILTIN_FUNCTIONS;
use crate::binder::JoinPredicate;
use crate::binder::Visibility;
use crate::optimizer::heuristic::subquery_rewriter::FlattenInfo;
use crate::optimizer::heuristic::subquery_rewriter::SubqueryRewriter;
use crate::optimizer::heuristic::subquery_rewriter::UnnestResult;
use crate::optimizer::ColumnSet;
use crate::optimizer::RelExpr;
use crate::optimizer::SExpr;
use crate::planner::binder::wrap_cast;
use crate::plans::Aggregate;
use crate::plans::AggregateFunction;
use crate::plans::AggregateMode;
use crate::plans::AndExpr;
use crate::plans::BoundColumnRef;
use crate::plans::CastExpr;
use crate::plans::ComparisonExpr;
use crate::plans::ComparisonOp;
use crate::plans::EvalScalar;
use crate::plans::Filter;
use crate::plans::FunctionCall;
use crate::plans::Join;
use crate::plans::JoinType;
use crate::plans::NotExpr;
use crate::plans::OrExpr;
use crate::plans::PatternPlan;
use crate::plans::RelOp;
use crate::plans::RelOperator;
use crate::plans::ScalarExpr;
use crate::plans::ScalarItem;
use crate::plans::Scan;
use crate::plans::Statistics;
use crate::plans::SubqueryExpr;
use crate::plans::SubqueryType;
use crate::BaseTableColumn;
use crate::ColumnBinding;
use crate::ColumnEntry;
use crate::DerivedColumn;
use crate::IndexType;
use crate::MetadataRef;
use crate::TableInternalColumn;
/// Decorrelate subqueries inside `s_expr`.
///
/// We only need to process three kinds of join: Scalar Subquery, Any Subquery, and Exists Subquery.
/// Other kinds of subqueries have be converted to one of the above subqueries in `type_check`.
///
/// It will rewrite `s_expr` to all kinds of join.
/// Correlated scalar subquery -> Single join
/// Any subquery -> Marker join
/// Correlated exists subquery -> Marker join
///
/// More information can be found in the paper: Unnesting Arbitrary Queries
pub fn decorrelate_subquery(metadata: MetadataRef, s_expr: SExpr) -> Result<SExpr> {
let mut rewriter = SubqueryRewriter::new(metadata);
rewriter.rewrite(&s_expr)
}
impl SubqueryRewriter {
// Try to decorrelate a `CrossApply` into `SemiJoin` or `AntiJoin`.
// We only do simple decorrelation here, the scheme is:
// 1. If the subquery is correlated, we will try to decorrelate it into `SemiJoin`
pub fn try_decorrelate_simple_subquery(
&self,
input: &SExpr,
subquery: &SubqueryExpr,
) -> Result<Option<SExpr>> {
if subquery.outer_columns.is_empty() {
return Ok(None);
}
// TODO(leiysky): this is the canonical plan generated by Binder, we should find a proper
// way to address such a pattern.
//
// EvalScalar
// \
// Filter
// \
// Get
let pattern = SExpr::create_unary(
PatternPlan {
plan_type: RelOp::EvalScalar,
}
.into(),
SExpr::create_unary(
PatternPlan {
plan_type: RelOp::Filter,
}
.into(),
SExpr::create_leaf(
PatternPlan {
plan_type: RelOp::Scan,
}
.into(),
),
),
);
if !subquery.subquery.match_pattern(&pattern) {
return Ok(None);
}
let filter_tree = subquery
.subquery // EvalScalar
.child(0)?; // Filter
let filter_expr = RelExpr::with_s_expr(filter_tree);
let filter: Filter = subquery
.subquery // EvalScalar
.child(0)? // Filter
.plan()
.clone()
.try_into()?;
let filter_prop = filter_expr.derive_relational_prop()?;
let filter_child_prop = filter_expr.derive_relational_prop_child(0)?;
let input_expr = RelExpr::with_s_expr(input);
let input_prop = input_expr.derive_relational_prop()?;
// First, we will check if all the outer columns are in the filter.
if !filter_child_prop.outer_columns.is_empty() {
return Ok(None);
}
// Second, we will check if the filter only contains equi-predicates.
// This is not necessary, but it is a good heuristic for most cases.
let mut left_conditions = vec![];
let mut right_conditions = vec![];
let mut non_equi_conditions = vec![];
let mut left_filters = vec![];
let mut right_filters = vec![];
for pred in filter.predicates.iter() {
let join_condition = JoinPredicate::new(pred, &input_prop, &filter_prop);
match join_condition {
JoinPredicate::Left(filter) => {
left_filters.push(filter.clone());
}
JoinPredicate::Right(filter) => {
right_filters.push(filter.clone());
}
JoinPredicate::Other(pred) => {
non_equi_conditions.push(pred.clone());
}
JoinPredicate::Both { left, right } => {
if left.data_type()?.eq(&right.data_type()?) {
left_conditions.push(left.clone());
right_conditions.push(right.clone());
continue;
}
let join_type = common_super_type(
left.data_type()?,
right.data_type()?,
&BUILTIN_FUNCTIONS.default_cast_rules,
)
.ok_or_else(|| ErrorCode::Internal("Cannot find common type"))?;
let left = wrap_cast(left, &join_type);
let right = wrap_cast(right, &join_type);
left_conditions.push(left);
right_conditions.push(right);
}
}
}
let join = Join {
left_conditions,
right_conditions,
non_equi_conditions,
join_type: match &subquery.typ {
SubqueryType::Any | SubqueryType::All | SubqueryType::Scalar => {
return Ok(None);
}
SubqueryType::Exists => JoinType::LeftSemi,
SubqueryType::NotExists => JoinType::LeftAnti,
},
marker_index: None,
from_correlated_subquery: true,
contain_runtime_filter: false,
};
// Rewrite plan to semi-join.
let mut left_child = input.clone();
if !left_filters.is_empty() {
left_child = SExpr::create_unary(
Filter {
predicates: left_filters,
is_having: false,
}
.into(),
left_child,
);
}
// Remove `Filter` from subquery.
let mut right_child = SExpr::create_unary(
subquery.subquery.plan().clone(),
SExpr::create_unary(
subquery.subquery.plan().clone(),
SExpr::create_leaf(filter_tree.child(0)?.plan().clone()),
),
);
if !right_filters.is_empty() {
right_child = SExpr::create_unary(
Filter {
predicates: right_filters,
is_having: false,
}
.into(),
right_child,
);
}
let result = SExpr::create_binary(join.into(), left_child, right_child);
Ok(Some(result))
}
pub fn try_decorrelate_subquery(
&mut self,
left: &SExpr,
subquery: &SubqueryExpr,
flatten_info: &mut FlattenInfo,
is_conjunctive_predicate: bool,
) -> Result<(SExpr, UnnestResult)> {
match subquery.typ {
SubqueryType::Scalar => {
let correlated_columns = subquery.outer_columns.clone();
let flatten_plan =
self.flatten(&subquery.subquery, &correlated_columns, flatten_info, false)?;
// Construct single join
let mut left_conditions = Vec::with_capacity(correlated_columns.len());
let mut right_conditions = Vec::with_capacity(correlated_columns.len());
self.add_equi_conditions(
subquery.span,
&correlated_columns,
&mut right_conditions,
&mut left_conditions,
)?;
let join_plan = Join {
left_conditions,
right_conditions,
non_equi_conditions: vec![],
join_type: JoinType::Single,
marker_index: None,
from_correlated_subquery: true,
contain_runtime_filter: false,
};
let s_expr = SExpr::create_binary(join_plan.into(), left.clone(), flatten_plan);
Ok((s_expr, UnnestResult::SingleJoin))
}
SubqueryType::Exists | SubqueryType::NotExists => {
if is_conjunctive_predicate {
if let Some(result) = self.try_decorrelate_simple_subquery(left, subquery)? {
return Ok((result, UnnestResult::SimpleJoin));
}
}
let correlated_columns = subquery.outer_columns.clone();
let flatten_plan =
self.flatten(&subquery.subquery, &correlated_columns, flatten_info, false)?;
// Construct mark join
let mut left_conditions = Vec::with_capacity(correlated_columns.len());
let mut right_conditions = Vec::with_capacity(correlated_columns.len());
self.add_equi_conditions(
subquery.span,
&correlated_columns,
&mut left_conditions,
&mut right_conditions,
)?;
let marker_index = if let Some(idx) = subquery.projection_index {
idx
} else {
self.metadata.write().add_derived_column(
"marker".to_string(),
DataType::Nullable(Box::new(DataType::Boolean)),
)
};
let join_plan = Join {
left_conditions: right_conditions,
right_conditions: left_conditions,
non_equi_conditions: vec![],
join_type: JoinType::RightMark,
marker_index: Some(marker_index),
from_correlated_subquery: true,
contain_runtime_filter: false,
};
let s_expr = SExpr::create_binary(join_plan.into(), left.clone(), flatten_plan);
Ok((s_expr, UnnestResult::MarkJoin { marker_index }))
}
SubqueryType::Any => {
let correlated_columns = subquery.outer_columns.clone();
let flatten_plan =
self.flatten(&subquery.subquery, &correlated_columns, flatten_info, false)?;
let mut left_conditions = Vec::with_capacity(correlated_columns.len());
let mut right_conditions = Vec::with_capacity(correlated_columns.len());
self.add_equi_conditions(
subquery.span,
&correlated_columns,
&mut left_conditions,
&mut right_conditions,
)?;
let output_column = subquery.output_column.clone();
let column_name = format!("subquery_{}", output_column.index);
let right_condition = wrap_cast(
&ScalarExpr::BoundColumnRef(BoundColumnRef {
span: subquery.span,
column: ColumnBinding {
database_name: None,
table_name: None,
column_name,
index: output_column.index,
data_type: output_column.data_type,
visibility: Visibility::Visible,
},
}),
&subquery.data_type,
);
let child_expr = *subquery.child_expr.as_ref().unwrap().clone();
let op = subquery.compare_op.as_ref().unwrap().clone();
// Make <child_expr op right_condition> as non_equi_conditions even if op is equal operator.
// Because it's not null-safe.
let non_equi_conditions = vec![ScalarExpr::ComparisonExpr(ComparisonExpr {
op,
left: Box::new(child_expr),
right: Box::new(right_condition),
})];
let marker_index = if let Some(idx) = subquery.projection_index {
idx
} else {
self.metadata.write().add_derived_column(
"marker".to_string(),
DataType::Nullable(Box::new(DataType::Boolean)),
)
};
let mark_join = Join {
left_conditions: right_conditions,
right_conditions: left_conditions,
non_equi_conditions,
join_type: JoinType::RightMark,
marker_index: Some(marker_index),
from_correlated_subquery: true,
contain_runtime_filter: false,
}
.into();
Ok((
SExpr::create_binary(mark_join, left.clone(), flatten_plan),
UnnestResult::MarkJoin { marker_index },
))
}
_ => unreachable!(),
}
}
fn flatten(
&mut self,
plan: &SExpr,
correlated_columns: &ColumnSet,
flatten_info: &mut FlattenInfo,
mut need_cross_join: bool,
) -> Result<SExpr> {
let rel_expr = RelExpr::with_s_expr(plan);
let prop = rel_expr.derive_relational_prop()?;
if prop.outer_columns.is_empty() {
if !need_cross_join {
return Ok(plan.clone());
}
// Construct a LogicalGet plan by correlated columns.
// Finally generate a cross join, so we finish flattening the subquery.
let mut metadata = self.metadata.write();
// Currently, we don't support left plan's from clause contains subquery.
// Such as: select t2.a from (select a + 1 as a from t) as t2 where (select sum(a) from t as t1 where t1.a < t2.a) = 1;
let table_index = metadata
.table_index_by_column_indexes(correlated_columns)
.unwrap();
for correlated_column in correlated_columns.iter() {
let column_entry = metadata.column(*correlated_column).clone();
let (name, data_type) = match &column_entry {
ColumnEntry::BaseTableColumn(BaseTableColumn {
column_name,
data_type,
..
}) => (column_name, DataType::from(data_type)),
ColumnEntry::DerivedColumn(DerivedColumn {
alias, data_type, ..
}) => (alias, data_type.clone()),
ColumnEntry::InternalColumn(TableInternalColumn {
internal_column, ..
}) => (internal_column.column_name(), internal_column.data_type()),
};
self.derived_columns.insert(
*correlated_column,
metadata.add_derived_column(name.to_string(), data_type.wrap_nullable()),
);
}
let logical_get = SExpr::create_leaf(
Scan {
table_index,
columns: self.derived_columns.values().cloned().collect(),
push_down_predicates: None,
limit: None,
order_by: None,
statistics: Statistics {
statistics: None,
col_stats: HashMap::new(),
is_accurate: false,
},
prewhere: None,
}
.into(),
);
// Todo(xudong963): Wrap logical get with distinct to eliminate duplicates rows.
let cross_join = Join {
left_conditions: vec![],
right_conditions: vec![],
non_equi_conditions: vec![],
join_type: JoinType::Cross,
marker_index: None,
from_correlated_subquery: false,
contain_runtime_filter: false,
}
.into();
return Ok(SExpr::create_binary(cross_join, logical_get, plan.clone()));
}
match plan.plan() {
RelOperator::EvalScalar(eval_scalar) => {
if eval_scalar
.used_columns()?
.iter()
.any(|index| correlated_columns.contains(index))
{
need_cross_join = true;
}
let flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
let mut items = Vec::with_capacity(eval_scalar.items.len());
for item in eval_scalar.items.iter() {
let new_item = ScalarItem {
scalar: self.flatten_scalar(&item.scalar, correlated_columns)?,
index: item.index,
};
items.push(new_item);
}
let metadata = self.metadata.read();
for derived_column in self.derived_columns.values() {
let column_entry = metadata.column(*derived_column);
let data_type = match column_entry {
ColumnEntry::BaseTableColumn(BaseTableColumn { data_type, .. }) => {
DataType::from(data_type)
}
ColumnEntry::DerivedColumn(DerivedColumn { data_type, .. }) => {
data_type.clone()
}
ColumnEntry::InternalColumn(TableInternalColumn {
internal_column,
..
}) => internal_column.data_type(),
};
let column_binding = ColumnBinding {
database_name: None,
table_name: None,
column_name: format!("subquery_{}", derived_column),
index: *derived_column,
data_type: Box::from(data_type.clone()),
visibility: Visibility::Visible,
};
items.push(ScalarItem {
scalar: ScalarExpr::BoundColumnRef(BoundColumnRef {
span: None,
column: column_binding,
}),
index: *derived_column,
});
}
Ok(SExpr::create_unary(
EvalScalar { items }.into(),
flatten_plan,
))
}
RelOperator::Filter(filter) => {
let mut predicates = Vec::with_capacity(filter.predicates.len());
if !need_cross_join {
need_cross_join = self.join_outer_inner_table(filter, correlated_columns)?;
if need_cross_join {
self.derived_columns.clear();
}
}
let flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
for predicate in filter.predicates.iter() {
predicates.push(self.flatten_scalar(predicate, correlated_columns)?);
}
let filter_plan = Filter {
predicates,
is_having: filter.is_having,
}
.into();
Ok(SExpr::create_unary(filter_plan, flatten_plan))
}
RelOperator::Join(join) => {
// Currently, we don't support join conditions contain subquery
if join
.used_columns()?
.iter()
.any(|index| correlated_columns.contains(index))
{
need_cross_join = true;
}
let left_flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
let right_flatten_plan = self.flatten(
plan.child(1)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
Ok(SExpr::create_binary(
Join {
left_conditions: join.left_conditions.clone(),
right_conditions: join.right_conditions.clone(),
non_equi_conditions: join.non_equi_conditions.clone(),
join_type: join.join_type.clone(),
marker_index: join.marker_index,
from_correlated_subquery: false,
contain_runtime_filter: false,
}
.into(),
left_flatten_plan,
right_flatten_plan,
))
}
RelOperator::Aggregate(aggregate) => {
if aggregate
.used_columns()?
.iter()
.any(|index| correlated_columns.contains(index))
{
need_cross_join = true;
}
let flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
let mut group_items = Vec::with_capacity(aggregate.group_items.len());
for item in aggregate.group_items.iter() {
let scalar = self.flatten_scalar(&item.scalar, correlated_columns)?;
group_items.push(ScalarItem {
scalar,
index: item.index,
})
}
for derived_column in self.derived_columns.values() {
let column_binding = {
let metadata = self.metadata.read();
let column_entry = metadata.column(*derived_column);
let data_type = match column_entry {
ColumnEntry::BaseTableColumn(BaseTableColumn { data_type, .. }) => {
DataType::from(data_type)
}
ColumnEntry::DerivedColumn(DerivedColumn { data_type, .. }) => {
data_type.clone()
}
ColumnEntry::InternalColumn(TableInternalColumn {
internal_column,
..
}) => internal_column.data_type(),
};
ColumnBinding {
database_name: None,
table_name: None,
column_name: format!("subquery_{}", derived_column),
index: *derived_column,
data_type: Box::from(data_type.clone()),
visibility: Visibility::Visible,
}
};
group_items.push(ScalarItem {
scalar: ScalarExpr::BoundColumnRef(BoundColumnRef {
span: None,
column: column_binding,
}),
index: *derived_column,
});
}
let mut agg_items = Vec::with_capacity(aggregate.aggregate_functions.len());
for item in aggregate.aggregate_functions.iter() {
let scalar = self.flatten_scalar(&item.scalar, correlated_columns)?;
if let ScalarExpr::AggregateFunction(AggregateFunction { func_name, .. }) =
&scalar
{
if func_name.eq_ignore_ascii_case("count") || func_name.eq("count_distinct")
{
flatten_info.from_count_func = true;
}
}
agg_items.push(ScalarItem {
scalar,
index: item.index,
})
}
Ok(SExpr::create_unary(
Aggregate {
mode: AggregateMode::Initial,
group_items,
aggregate_functions: agg_items,
from_distinct: aggregate.from_distinct,
limit: aggregate.limit,
grouping_id_index: aggregate.grouping_id_index,
grouping_sets: aggregate.grouping_sets.clone(),
}
.into(),
flatten_plan,
))
}
RelOperator::Sort(_) => {
// Currently, we don't support sort contain subquery.
let flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
Ok(SExpr::create_unary(plan.plan().clone(), flatten_plan))
}
RelOperator::Limit(_) => {
// Currently, we don't support limit contain subquery.
let flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
Ok(SExpr::create_unary(plan.plan().clone(), flatten_plan))
}
RelOperator::UnionAll(op) => {
if op
.used_columns()?
.iter()
.any(|index| correlated_columns.contains(index))
{
need_cross_join = true;
}
let left_flatten_plan = self.flatten(
plan.child(0)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
let right_flatten_plan = self.flatten(
plan.child(1)?,
correlated_columns,
flatten_info,
need_cross_join,
)?;
Ok(SExpr::create_binary(
op.clone().into(),
left_flatten_plan,
right_flatten_plan,
))
}
_ => Err(ErrorCode::Internal(
"Invalid plan type for flattening subquery",
)),
}
}
fn flatten_scalar(
&mut self,
scalar: &ScalarExpr,
correlated_columns: &ColumnSet,
) -> Result<ScalarExpr> {
match scalar {
ScalarExpr::BoundColumnRef(bound_column) => {
let column_binding = bound_column.column.clone();
if correlated_columns.contains(&column_binding.index) {
let index = self.derived_columns.get(&column_binding.index).unwrap();
return Ok(ScalarExpr::BoundColumnRef(BoundColumnRef {
span: scalar.span(),
column: ColumnBinding {
database_name: None,
table_name: None,
column_name: format!("subquery_{}", index),
index: *index,
data_type: column_binding.data_type.clone(),
visibility: column_binding.visibility,
},
}));
}
Ok(scalar.clone())
}
ScalarExpr::ConstantExpr(_) => Ok(scalar.clone()),
ScalarExpr::AndExpr(and_expr) => {
let left = self.flatten_scalar(&and_expr.left, correlated_columns)?;
let right = self.flatten_scalar(&and_expr.right, correlated_columns)?;
Ok(ScalarExpr::AndExpr(AndExpr {
left: Box::new(left),
right: Box::new(right),
}))
}
ScalarExpr::OrExpr(or_expr) => {
let left = self.flatten_scalar(&or_expr.left, correlated_columns)?;
let right = self.flatten_scalar(&or_expr.right, correlated_columns)?;
Ok(ScalarExpr::OrExpr(OrExpr {
left: Box::new(left),
right: Box::new(right),
}))
}
ScalarExpr::NotExpr(not_expr) => {
let argument = self.flatten_scalar(¬_expr.argument, correlated_columns)?;
Ok(ScalarExpr::NotExpr(NotExpr {
argument: Box::new(argument),
}))
}
ScalarExpr::ComparisonExpr(comparison_expr) => {
let left = self.flatten_scalar(&comparison_expr.left, correlated_columns)?;
let right = self.flatten_scalar(&comparison_expr.right, correlated_columns)?;
Ok(ScalarExpr::ComparisonExpr(ComparisonExpr {
op: comparison_expr.op.clone(),
left: Box::new(left),
right: Box::new(right),
}))
}
ScalarExpr::AggregateFunction(agg) => {
let mut args = Vec::with_capacity(agg.args.len());
for arg in &agg.args {
args.push(self.flatten_scalar(arg, correlated_columns)?);
}
Ok(ScalarExpr::AggregateFunction(AggregateFunction {
display_name: agg.display_name.clone(),
func_name: agg.func_name.clone(),
distinct: agg.distinct,
params: agg.params.clone(),
args,
return_type: agg.return_type.clone(),
}))
}
ScalarExpr::FunctionCall(fun_call) => {
let mut arguments = Vec::with_capacity(fun_call.arguments.len());
for arg in &fun_call.arguments {
arguments.push(self.flatten_scalar(arg, correlated_columns)?);
}
Ok(ScalarExpr::FunctionCall(FunctionCall {
span: fun_call.span,
params: fun_call.params.clone(),
arguments,
func_name: fun_call.func_name.clone(),
}))
}
ScalarExpr::CastExpr(cast_expr) => {
let scalar = self.flatten_scalar(&cast_expr.argument, correlated_columns)?;
Ok(ScalarExpr::CastExpr(CastExpr {
span: cast_expr.span,
is_try: cast_expr.is_try,
argument: Box::new(scalar),
target_type: cast_expr.target_type.clone(),
}))
}
_ => Err(ErrorCode::Internal(
"Invalid scalar for flattening subquery",
)),
}
}
fn add_equi_conditions(
&self,
span: Span,
correlated_columns: &HashSet<IndexType>,
left_conditions: &mut Vec<ScalarExpr>,
right_conditions: &mut Vec<ScalarExpr>,
) -> Result<()> {
for correlated_column in correlated_columns.iter() {
let metadata = self.metadata.read();
let column_entry = metadata.column(*correlated_column);
let data_type = match column_entry {
ColumnEntry::BaseTableColumn(BaseTableColumn { data_type, .. }) => {
DataType::from(data_type)
}
ColumnEntry::DerivedColumn(DerivedColumn { data_type, .. }) => data_type.clone(),
ColumnEntry::InternalColumn(TableInternalColumn {
internal_column, ..
}) => internal_column.data_type(),
};
let right_column = ScalarExpr::BoundColumnRef(BoundColumnRef {
span,
column: ColumnBinding {
database_name: None,
table_name: None,
column_name: format!("subquery_{}", correlated_column),
index: *correlated_column,
data_type: Box::from(data_type.clone()),
visibility: Visibility::Visible,
},
});
let derive_column = self.derived_columns.get(correlated_column).unwrap();
let left_column = ScalarExpr::BoundColumnRef(BoundColumnRef {
span,
column: ColumnBinding {
database_name: None,
table_name: None,
column_name: format!("subquery_{}", derive_column),
index: *derive_column,
data_type: Box::from(data_type.clone()),
visibility: Visibility::Visible,
},
});
left_conditions.push(left_column);
right_conditions.push(right_column);
}
Ok(())
}
// Check if need to join outer and inner table
// If correlated_columns only occur in equi-conditions, such as `where t1.a = t.a and t1.b = t.b`(t1 is outer table)
// Then we won't join outer and inner table.
fn join_outer_inner_table(
&mut self,
filter: &Filter,
correlated_columns: &ColumnSet,
) -> Result<bool> {
Ok(!filter.predicates.iter().all(|predicate| {
if predicate
.used_columns()
.iter()
.any(|column| correlated_columns.contains(column))
{
if let ScalarExpr::ComparisonExpr(ComparisonExpr {
left, right, op, ..
}) = predicate
{
if op == &ComparisonOp::Equal {
if let (
ScalarExpr::BoundColumnRef(left),
ScalarExpr::BoundColumnRef(right),
) = (&**left, &**right)
{
if correlated_columns.contains(&left.column.index)
&& !correlated_columns.contains(&right.column.index)
{
self.derived_columns
.insert(left.column.index, right.column.index);
}
if !correlated_columns.contains(&left.column.index)
&& correlated_columns.contains(&right.column.index)
{
self.derived_columns
.insert(right.column.index, left.column.index);
}
return true;
}
}
}
return false;
}
true
}))
}
}
|
// Copyright © 2016-2017 VMware, Inc. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
use std::collections::HashMap;
use rabble::{self, Pid, Envelope, ConnectionMsg, ConnectionHandler, CorrelationId};
use msg::Msg;
use super::messages::{AdminMsg, AdminReq, AdminRpy};
/// The connection handler for Admin Clients
pub struct AdminConnectionHandler {
pid: Pid,
id: u64,
namespace_mgr: Pid,
total_requests: u64,
// The next reply we are waiting for
waiting_for: u64,
// Map of request ids to received responses. Responses received out of order are saved here.
out_of_order_replies: HashMap<u64, AdminRpy>
}
impl AdminConnectionHandler {
fn make_envelope(&mut self, pid: Pid, req: AdminReq) -> Envelope<Msg> {
let c_id = CorrelationId::request(self.pid.clone(), self.id, self.total_requests);
self.total_requests += 1;
Envelope {
to: pid,
from: self.pid.clone(),
msg: rabble::Msg::User(Msg::AdminReq(req)),
correlation_id: Some(c_id)
}
}
fn make_rabble_msg_envelope(&mut self, pid: Pid, msg: rabble::Msg<Msg>) -> Envelope<Msg> {
let c_id = CorrelationId::request(self.pid.clone(), self.id, self.total_requests);
self.total_requests += 1;
Envelope {
to: pid,
from: self.pid.clone(),
msg: msg,
correlation_id: Some(c_id)
}
}
fn write_successive_replies(&mut self,
output: &mut Vec<ConnectionMsg<AdminConnectionHandler>>)
{
self.waiting_for += 1;
while self.waiting_for != self.total_requests {
if let Some(rpy) = self.out_of_order_replies.remove(&self.waiting_for) {
let c_id = CorrelationId::request(self.pid.clone(), self.id, self.waiting_for);
output.push(ConnectionMsg::Client(AdminMsg::Rpy(rpy), c_id));
self.waiting_for += 1;
} else {
break;
}
}
}
}
impl ConnectionHandler for AdminConnectionHandler {
type Msg = Msg;
type ClientMsg = AdminMsg;
fn new(pid: Pid, id: u64) -> AdminConnectionHandler {
let namespace_mgr = Pid {
name: "namespace_mgr".to_string(),
group: None,
node: pid.node.clone()
};
AdminConnectionHandler {
pid: pid,
id: id,
namespace_mgr: namespace_mgr,
total_requests: 0,
waiting_for: 0,
out_of_order_replies: HashMap::new()
}
}
fn handle_envelope(&mut self,
envelope: Envelope<Msg>,
output: &mut Vec<ConnectionMsg<AdminConnectionHandler>>)
{
let Envelope {msg, correlation_id, ..} = envelope;
let correlation_id = correlation_id.unwrap();
let rpy = match msg {
rabble::Msg::User(Msg::AdminRpy(rpy)) => rpy,
rabble::Msg::ClusterStatus(status) => AdminRpy::ClusterStatus(status),
rabble::Msg::Timeout => AdminRpy::Timeout,
rabble::Msg::Metrics(metrics) => AdminRpy::Metrics(metrics),
_ => unreachable!()
};
if correlation_id.request == Some(self.waiting_for) {
output.push(ConnectionMsg::Client(AdminMsg::Rpy(rpy), correlation_id));
self.write_successive_replies(output);
} else {
self.out_of_order_replies.insert(correlation_id.request.unwrap(), rpy);
}
}
fn handle_network_msg(&mut self,
msg: AdminMsg,
output: &mut Vec<ConnectionMsg<AdminConnectionHandler>>)
{
if let AdminMsg::Req(req) = msg {
let envelope = match req {
AdminReq::GetReplicaState(pid) =>
self.make_envelope(pid.clone(), AdminReq::GetReplicaState(pid)),
AdminReq::GetMetrics(pid) =>
self.make_rabble_msg_envelope(pid.clone(), rabble::Msg::GetMetrics),
_ => {
let pid = self.namespace_mgr.clone();
self.make_envelope(pid, req)
}
};
output.push(ConnectionMsg::Envelope(envelope));
} else {
let msg = AdminMsg::Rpy(AdminRpy::Error("Invalid Admin Request".to_string()));
// CorrelationId doesn't matter here
output.push(ConnectionMsg::Client(msg, CorrelationId::pid(self.pid.clone())));
}
}
}
|
use libc::{c_char, c_int};
pub type AssertCB = unsafe extern "C" fn(*const c_char, c_int, *const c_char);
#[link(name = "kernaux")]
extern "C" {
#[link_name = "kernaux_assert_do"]
pub fn assert_do(file: *const c_char, line: c_int, msg: *const c_char);
#[link_name = "kernaux_assert_cb"]
pub static mut assert_cb: Option<AssertCB>;
}
#[cfg(test)]
mod tests {
use super::*;
use std::ffi::{CStr, CString};
use std::ptr::null;
static mut LAST_FILE: *const c_char = null();
static mut LAST_LINE: c_int = 0;
static mut LAST_MSG: *const c_char = null();
unsafe extern "C" fn some_assert_cb(
file: *const c_char,
line: c_int,
msg: *const c_char,
) {
LAST_FILE = file;
LAST_LINE = line;
LAST_MSG = msg;
}
#[test]
fn default() {
unsafe {
assert_cb = None;
assert!(assert_cb.is_none());
assert_cb = Some(some_assert_cb);
match assert_cb {
None => panic!(),
Some(actual_assert_cb) => {
assert!(actual_assert_cb == some_assert_cb)
}
}
let file_cstr = CString::new("foo.rs").unwrap();
let msg_cstr = CString::new("bar").unwrap();
assert_do(
file_cstr.as_ptr() as *const c_char,
123,
msg_cstr.as_ptr() as *const c_char,
);
let file = CStr::from_ptr(LAST_FILE).to_str().unwrap();
let line = LAST_LINE;
let msg = CStr::from_ptr(LAST_MSG).to_str().unwrap();
assert_eq!(file, "foo.rs");
assert_eq!(line, 123);
assert_eq!(msg, "bar");
}
}
}
|
use P36::prime_factor_multiplicity;
pub fn totient(n: u32) -> u32 {
let prime_factors = prime_factor_multiplicity(n);
prime_factors
.iter()
.fold(1, |acc, (p, m)| acc * (p - 1) * p.pow(m - 1))
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_totient() {
assert_eq!(totient(6), 2);
assert_eq!(totient(20), 8);
assert_eq!(totient(123456), 41088);
}
}
|
// Copyright 2018 TAP, Inc. All Rights Reserved.
extern crate ws;
extern crate lazy_static;
use std::sync::Mutex;
use std::env;
lazy_static::lazy_static! {
static ref SENDERS: Mutex<Vec<ws::Sender>> = Mutex::new(Vec::new());
}
struct EchoHandler {
me: ws::Sender,
}
impl ws::Handler for EchoHandler {
fn on_message(&mut self, msg: ws::Message) -> ws::Result<()> {
for ref i in SENDERS.lock().unwrap().iter() {
if self.me.ne(i) {
i.send(msg.clone()).unwrap();
}
}
Ok(())
}
}
struct Server {}
impl ws::Factory for Server {
type Handler = EchoHandler;
fn connection_made(&mut self, sender: ws::Sender) -> EchoHandler {
println!("Connection : {}", sender.connection_id());
sender.send(format!("Connect:{}", sender.connection_id())).unwrap();
SENDERS.lock().unwrap().push(sender.clone());
EchoHandler{
me: sender,
}
}
fn connection_lost(&mut self, handler: EchoHandler) {
println!("Disconnect : {}", handler.me.connection_id());
SENDERS.lock().unwrap().retain(|ref sender| {
sender.send(format!("Disconnect:{}", handler.me.connection_id())).unwrap();
handler.me.ne(sender)
});
}
fn on_shutdown(&mut self) {
SENDERS.lock().unwrap().clear();
}
}
fn main() {
if let Some(arg1) = env::args().nth(1) {
println!("Open : {}", arg1);
ws::WebSocket::new(Server {}).unwrap().listen(arg1).unwrap();
}
else {
println!("Open : localhost:8989");
ws::WebSocket::new(Server {}).unwrap().listen("localhost:8989").unwrap();
}
}
|
use arrow::record_batch::RecordBatch;
use mutable_batch::MutableBatch;
use schema::Projection;
/// A [`Buffer`] is an internal mutable buffer wrapper over a [`MutableBatch`]
/// for the [`BufferState`] FSM.
///
/// A [`Buffer`] can contain no writes.
///
/// [`BufferState`]: super::BufferState
#[derive(Debug, Default)]
pub(super) struct Buffer {
buffer: Option<MutableBatch>,
}
impl Buffer {
/// Apply `batch` to the in-memory buffer.
///
/// # Data Loss
///
/// If this method returns an error, the data in `batch` is problematic and
/// has been discarded.
pub(super) fn buffer_write(&mut self, batch: MutableBatch) -> Result<(), mutable_batch::Error> {
match self.buffer {
Some(ref mut b) => b.extend_from(&batch)?,
None => self.buffer = Some(batch),
};
Ok(())
}
/// Generates a [`RecordBatch`] from the data in this [`Buffer`].
///
/// If this [`Buffer`] is empty when this method is called, the call is a
/// NOP and [`None`] is returned.
///
/// # Panics
///
/// If generating the snapshot fails, this method panics.
pub(super) fn snapshot(self) -> Option<RecordBatch> {
Some(
self.buffer?
.to_arrow(Projection::All)
.expect("failed to snapshot buffer data"),
)
}
pub(super) fn is_empty(&self) -> bool {
self.buffer.is_none()
}
/// Returns the underlying buffer if this [`Buffer`] contains data,
/// otherwise returns [`None`].
pub(super) fn buffer(&self) -> Option<&MutableBatch> {
self.buffer.as_ref()
}
pub(crate) fn persist_cost_estimate(&self) -> usize {
self.buffer().map(|v| v.size_data()).unwrap_or_default()
}
}
|
use crate::error::{Error, Result};
use parquet::record::{Field, Row};
use serde::de::{self, Deserialize, Visitor};
use serde::forward_to_deserialize_any;
type KeyVal<'de> = (Value<'de>, Value<'de>);
#[derive(Clone, Debug, PartialEq)]
enum Value<'de> {
Name(&'de str),
Field(&'de Field),
Seq(Vec<KeyVal<'de>>),
}
struct MapAccess<'a, 'de: 'a> {
de: &'a mut Deserializer<'de>,
iter: std::vec::IntoIter<KeyVal<'de>>,
value: Option<Value<'de>>,
len: usize,
}
impl<'a, 'de: 'a> MapAccess<'a, 'de> {
fn new(de: &'a mut Deserializer<'de>, v: Vec<KeyVal<'de>>) -> Self {
let len = v.len();
MapAccess {
de,
iter: v.into_iter(),
value: None,
len,
}
}
}
impl<'de, 'a> de::MapAccess<'de> for MapAccess<'a, 'de> {
type Error = Error;
fn next_key_seed<T: de::DeserializeSeed<'de>>(
&mut self,
seed: T,
) -> Result<Option<T::Value>> {
match self.iter.next() {
Some((name, field)) => {
self.len -= 1;
self.de.value = Some(name);
self.value = Some(field);
Ok(Some(seed.deserialize(&mut *self.de)?))
}
None => Ok(None),
}
}
fn next_value_seed<T: de::DeserializeSeed<'de>>(
&mut self,
seed: T,
) -> Result<T::Value> {
let value = self.value.take().unwrap();
self.de.value = Some(value);
Ok(seed.deserialize(&mut *self.de)?)
}
fn size_hint(&self) -> Option<usize> {
Some(self.len)
}
}
struct SeqAccess<'a, 'de: 'a> {
de: &'a mut Deserializer<'de>,
iter: std::slice::Iter<'de, Field>,
len: usize,
}
impl<'a, 'de: 'a> SeqAccess<'a, 'de> {
fn new(de: &'a mut Deserializer<'de>, v: &'de [Field]) -> Self {
let len = v.len();
SeqAccess {
de,
iter: v.into_iter(),
len,
}
}
}
impl<'de, 'a> de::SeqAccess<'de> for SeqAccess<'a, 'de> {
type Error = Error;
fn next_element_seed<T: de::DeserializeSeed<'de>>(
&mut self,
seed: T,
) -> Result<Option<T::Value>> {
match self.iter.next() {
Some(value) => {
self.len -= 1;
self.de.value = Some(Value::Field(value));
Ok(Some(seed.deserialize(&mut *self.de)?))
}
None => Ok(None),
}
}
fn size_hint(&self) -> Option<usize> {
Some(self.len)
}
}
pub struct Deserializer<'de> {
input: &'de Row,
value: Option<Value<'de>>,
}
impl<'de> Deserializer<'de> {
pub fn from_row(r: &'de Row) -> Self {
Deserializer {
input: r,
value: None,
}
}
fn get_next_value(&mut self) -> Result<Value<'de>> {
match self.value.take() {
Some(v) => Ok(v),
None => {
let map = self
.input
.get_column_iter()
.map(|(n, f)| (Value::Name(n), Value::Field(f)))
.collect::<Vec<_>>();
let value = Value::Seq(map);
Ok(value)
}
}
}
}
pub fn from_row<'a, T>(r: &'a Row) -> Result<T>
where
T: Deserialize<'a>,
{
let mut deserializer = Deserializer::from_row(r);
let t = T::deserialize(&mut deserializer)?;
Ok(t)
}
impl<'de: 'a, 'a> de::Deserializer<'de> for &'a mut Deserializer<'de> {
type Error = Error;
fn deserialize_any<V>(mut self, visitor: V) -> Result<V::Value>
where
V: Visitor<'de>,
{
let value = self.get_next_value()?;
match value {
Value::Seq(v) => visitor.visit_map(MapAccess::new(&mut self, v)),
Value::Name(s) => visitor.visit_str(s),
Value::Field(f) => match f {
Field::Null => visitor.visit_unit(),
Field::Bool(v) => visitor.visit_bool(*v),
Field::Byte(v) => visitor.visit_i8(*v),
Field::Short(v) => visitor.visit_i16(*v),
Field::Int(v) => visitor.visit_i32(*v),
Field::Long(v) => visitor.visit_i64(*v),
Field::UByte(v) => visitor.visit_u8(*v),
Field::UShort(v) => visitor.visit_u16(*v),
Field::UInt(v) => visitor.visit_u32(*v),
Field::ULong(v) => visitor.visit_u64(*v),
Field::Float(v) => visitor.visit_f32(*v),
Field::Double(v) => visitor.visit_f64(*v),
Field::Decimal(_) => todo!(),
Field::Str(v) => visitor.visit_str(v),
Field::Bytes(v) => visitor.visit_bytes(v.data()),
Field::Date(v) => visitor.visit_u32(*v),
Field::TimestampMillis(v) => visitor.visit_u64(*v),
Field::TimestampMicros(v) => visitor.visit_u64(*v),
Field::Group(v) => visitor.visit_map(MapAccess::new(
&mut self,
v.get_column_iter()
.map(|(n, f)| (Value::Name(n), Value::Field(f)))
.collect(),
)),
Field::MapInternal(v) => visitor.visit_map(MapAccess::new(
&mut self,
v.entries()
.iter()
.map(|(k, v)| (Value::Field(k), Value::Field(v)))
.collect(),
)),
Field::ListInternal(v) => {
visitor.visit_seq(SeqAccess::new(&mut self, v.elements()))
}
},
}
}
forward_to_deserialize_any! {
bool u8 u16 u32 u64 i8 i16 i32 i64 f32 f64 char str string unit seq
bytes byte_buf map tuple_struct struct identifier
tuple ignored_any unit_struct enum option newtype_struct
}
}
#[cfg(test)]
mod tests {
use super::from_row;
use parquet::file::{
reader::FileReader, serialized_reader::SerializedFileReader,
};
use serde_derive::Deserialize;
use std::fs::File;
use std::path::PathBuf;
#[test]
fn test_struct() {
#[derive(Deserialize, PartialEq, Debug)]
struct Test {
x: u32,
y: u32,
}
let mut test_file = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
test_file.push("tests/test.parquet");
let file = File::open(&test_file).unwrap();
let reader = SerializedFileReader::new(file).unwrap();
let mut iter = reader.get_row_iter(None).unwrap();
let row = iter.next().unwrap();
let expected = Test { x: 1, y: 2 };
assert_eq!(expected, from_row(&row).unwrap());
}
}
|
#[macro_use]
extern crate fail;
mod imp;
mod rpc;
#[cfg(test)]
mod tests;
use jsonrpc_core::{self, Result};
use jsonrpc_derive::rpc;
use crate::rpc::Rpc;
pub struct StorageBuilder;
impl StorageBuilder {
pub fn build(rpc: Rpc) -> impl Store {
imp::MemoryStorage::new(rpc)
// unimplemented!()
}
}
pub struct TimeStampOracleBuilder;
impl TimeStampOracleBuilder {
pub fn build() -> impl TimeStamp {
imp::TimeStampOracle::new()
// unimplemented!()
}
}
#[rpc]
pub trait TimeStamp {
#[rpc(name = "rpc_get_timestamp")]
fn get_timestamp(&self) -> Result<u64>;
}
pub trait Store {
type Transaction: Transaction;
fn begin(&self) -> Self::Transaction;
}
pub trait Transaction {
fn get(&self, key: Vec<u8>) -> Option<Vec<u8>>;
fn set(&mut self, key: Vec<u8>, value: Vec<u8>);
fn commit(self) -> bool;
}
|
#[macro_export]
macro_rules! fs_fn {
(
$( #[$meta:meta] )*
fn $test_name:ident $params:tt ($test_dir:ident) -> $return:ty $body:block
) => {
$( #[$meta] )*
fn $test_name $params -> $return {
let $test_dir = test_dir::TestDir::new();
let res = $block
$test_dir.close()
res
}
};
(
$( #[$meta:meta] )*
fn $test_name:ident $params:tt ($test_dir:ident) $body:block
) => {
$( #[$meta] )*
fn $test_name $params {
let $test_dir = test_dir::TestDir::new();
$body
$test_dir.close()
}
};
}
macro_rules! err {
($($tt:tt)*) => {
Box::<dyn std::error::Error + Send + Sync>::from(format!($($tt)*))
}
}
/// helper macro to call asref on all of the identifiers
macro_rules! as_ref_all {
( $( $var:ident ),* ) => {
$( let $var = $var.as_ref(); )*
};
}
#[macro_export]
macro_rules! join_all {
( $self:ident, $($path:ident),+ ) => {
$(
let $path = $self.join_check(Path::new($path));
)+
};
( $self:ident, $($path:expr),+ ) => {
(
$(
$self.join_check($path)
),+
)
}
}
#[macro_export]
macro_rules! assert_file_contents_eq {
( $($path:expr),* ) => {
assert_eq!(
$({
use std::fs::File;
use std::io::Read;
let path = &$path;
let mut file = File::open(&path).unwrap_or_else(|_| panic!("Failed to open path {}", path.display()));
let mut buf = Vec::new();
file.read_to_end(&mut buf).unwrap_or_else(|_| panic!("Failed to read file with path {} to end", path.display()));
buf
}),*
)
};
}
#[macro_export]
macro_rules! assert_paths_exists {
( $($path:expr),* ) => {
$(
let path = $path;
if !path.exists() {
panic!("Assertion failed, the path {} does not exist", path.display())
}
)*
};
}
macro_rules! assert_macro_testing {
($($boolean:expr),+) => {
assert!(
true $( && {
$boolean
})+
)
};
}
#[test]
fn assert_macro_test() {
assert_macro_testing!(true, true);
}
#[test]
#[should_panic]
fn asset_macro_test_one_false() {
assert_macro_testing!(true, true, false, true);
}
|
#![allow(dead_code)]
// https://www.techiedelight.com/huffman-coding/
use std::cmp::Ordering;
use std::collections::BinaryHeap;
use std::collections::HashMap;
use std::fmt;
use std::cmp::Reverse; // Used for min heap, this fixed all my problems with all nodes on the left lol
#[derive(Debug, Clone)]
pub struct HuffCode {
pub val: char,
pub bitlength: u8, // number of bits used
pub code: u64,
pub code_str: String
}
impl fmt::Display for HuffCode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let d = self.val.to_string();
let o = if self.val == '\n' {"\\n"} else {&d[..]};
write!(f, "{:5} {:0width$b}:{}", o, self.code, self.bitlength, width=self.bitlength as usize)
}
}
#[derive(Debug, Eq, Clone)]
pub struct HuffmanNode {
pub freq_value: i32,
pub left: Option<Box<HuffmanNode>>,
pub right: Option<Box<HuffmanNode>>,
pub value: Option<char> // only populated if it is a leaf
}
impl Ord for HuffmanNode {
fn cmp(&self, other: &Self) -> Ordering {
return self.freq_value.cmp(&other.freq_value);
}
}
impl PartialOrd for HuffmanNode {
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
return Some(self.cmp(other));
}
}
impl PartialEq for HuffmanNode {
fn eq (&self, other: &Self) -> bool {
return self.freq_value == other.freq_value;
}
}
impl HuffmanNode {
pub fn new(data: &str) -> HuffmanNode {
let mut freq_map = HashMap::new();
let mut min_heap:BinaryHeap<Reverse<HuffmanNode>> = BinaryHeap::new();
// create a frequency map, and build each huffman node
for c in data.chars() {
if !freq_map.contains_key(&c){
freq_map.insert(c, HuffmanNode {freq_value: 1, value: Some(c), left: None, right: None});
}
else{
let mut item = freq_map.get_mut(&c).unwrap();
item.freq_value = item.freq_value + 1;
}
}
for (_, v) in freq_map.into_iter(){
min_heap.push(Reverse(v));
}
while let Some(node1) = min_heap.pop() {
let tmp_node2 = min_heap.pop();
if !tmp_node2.is_some(){
return node1.0;
}
let node2 = tmp_node2.unwrap();
let merged_node = HuffmanNode {
freq_value: node1.0.freq_value + node2.0.freq_value,
value: None,
left: Some(Box::new(node1.0)),
right: Some(Box::new(node2.0))
};
min_heap.push(Reverse(merged_node));
}
// should never get down here.
return HuffmanNode {freq_value: 1, value: Some('d'), left: None, right: None}
}
}
pub fn gen_codes(root_node: &HuffmanNode) -> Vec<HuffCode>{
let mut out_codes: Vec<HuffCode> = Vec::new();
recurse_codes(root_node, &mut out_codes, "".to_string(), 0, 0);
return out_codes;
}
pub fn gen_code_map(root_node: &HuffmanNode) -> HashMap<char, HuffCode> {
let codes = gen_codes(root_node);
let mut out_map = HashMap::new();
for code in codes {
out_map.insert(code.val, code);
}
return out_map;
}
fn recurse_codes(node: &HuffmanNode, codes: &mut Vec<HuffCode>, location_str: String, location: u64, depth: u8){
let loc_clone = location_str.to_owned();
if node.value.is_some() {
let char_val = node.value.unwrap();
codes.push(HuffCode {val: char_val, bitlength: depth, code: location, code_str: loc_clone.clone()})
}
let left_code_str = format!("{}0", location_str).to_owned();
let right_code_str = format!("{}1", location_str).to_owned();
let left_code = location << 1;
let right_code = (location << 1) | 1;
if node.left.is_some() {
recurse_codes(&node.left.as_ref().unwrap(), codes, left_code_str, left_code, depth + 1)
}
if node.right.is_some() {
recurse_codes(&node.right.as_ref().unwrap(), codes, right_code_str, right_code, depth + 1);
}
}
// We have a collection of HuffCodes.
// Each HuffCode has a u64 code (which stores the actual binary data)
// and u8 bitlength, which determines the length of the u64 code we are taking.
// We are trying to concatenate all of these into a single vector of u8s.
pub fn codes_to_bin(codes: &mut Vec<HuffCode>) -> Vec<u8> {
let mut output_tmp:Vec<u8> = Vec::new();
let most_significant = 0x8000000000000000 as u64;
for huffCode in codes.into_iter() {
let mut code = huffCode.code;
let mut index = 0;
code = code << (64 - huffCode.bitlength);
while index < huffCode.bitlength {
if code & most_significant == most_significant {
output_tmp.push(1);
}
else {
output_tmp.push(0);
}
index += 1;
code = code << 1;
}
}
let mut output:Vec<u8> = Vec::new();
let mut index = 0;
let mut tmp_byte:u8 = 0;
while index < output_tmp.len() {
// println!("{}", output_tmp[index]);
if output_tmp[index] == 1 {
tmp_byte = tmp_byte | 1;
}
else {
tmp_byte = tmp_byte & 0b11111110;
}
if index % 8 == 7 || index + 1 == output_tmp.len() {
// println!("Pushing!: {:08b} @ i:{}", tmp_byte, index);
if index + 1 == output_tmp.len() {
tmp_byte = tmp_byte << (8 - (output_tmp.len() % 8));
}
output.push(tmp_byte);
tmp_byte = 0;
}
index += 1;
tmp_byte = tmp_byte << 1;
}
// println!("==========\nOutput binary");
// for b in output.clone() {
// print!("{:08b}", b);
// }
// println!("\ncode_str concat comparison");
// for c in codes.into_iter() {
// print!("{}", c.code_str);
// }
// println!();
return output;
} |
use enumset::EnumSet;
use super::{ast::AstError, cst, cst::CstError, hir::HirError};
use crate::{
mir::MirError,
module::Module,
position::{Offset, PositionConversionDb},
rich_ir::{ReferenceKey, RichIrBuilder, ToRichIr},
string_to_rcst::ModuleError,
};
use derive_more::From;
use itertools::Itertools;
use std::{fmt::Display, hash::Hash, ops::Range};
#[derive(Debug, PartialEq, Eq, Clone, Hash)]
pub struct CompilerError {
pub module: Module,
pub span: Range<Offset>,
pub payload: CompilerErrorPayload,
}
#[derive(Clone, Debug, Eq, From, Hash, PartialEq)]
pub enum CompilerErrorPayload {
Module(ModuleError),
Cst(CstError),
Ast(AstError),
Hir(HirError),
Mir(MirError),
}
impl CompilerError {
pub fn for_whole_module(module: Module, payload: impl Into<CompilerErrorPayload>) -> Self {
Self {
module,
span: Offset(0)..Offset(0),
payload: payload.into(),
}
}
pub fn to_string_with_location(&self, db: &impl PositionConversionDb) -> String {
let range = db.range_to_positions(self.module.clone(), self.span.to_owned());
format!(
"{}:{}:{} – {}:{}: {}",
self.module,
range.start.line,
range.start.character,
range.end.line,
range.end.character,
self.payload,
)
}
}
impl Display for CompilerErrorPayload {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let message = match self {
CompilerErrorPayload::Module(error) => match error {
ModuleError::DoesNotExist => "The module doesn't exist.".to_string(),
ModuleError::InvalidUtf8 => "The module contains invalid UTF-8.".to_string(),
ModuleError::IsNotCandy => "The module is not Candy.".to_string(),
ModuleError::IsToolingModule => "The module is a tooling module.".to_string(),
},
CompilerErrorPayload::Cst(error) => match error {
CstError::BinaryBarMissesRight => "There should be a right side after this bar.",
CstError::CurlyBraceNotClosed => "The curly brace is not closed.",
CstError::IdentifierContainsNonAlphanumericAscii => {
"This identifier contains non-alphanumeric ASCII characters."
}
CstError::IntContainsNonDigits => {
"This integer contains characters that are not digits."
}
CstError::ListItemMissesValue => "This list item is missing a value.",
CstError::ListNotClosed => "The list is not closed.",
CstError::MatchMissesCases => "This match misses cases to match against.",
CstError::MatchCaseMissesArrow => "This match case misses an arrow.",
CstError::MatchCaseMissesBody => "This match case misses a body to run.",
CstError::OpeningParenthesisMissesExpression => {
"Here's an opening parenthesis without an expression after it."
}
CstError::OrPatternMissesRight => "This or-pattern misses a right-hand side.",
CstError::ParenthesisNotClosed => "This parenthesis isn't closed.",
CstError::StructFieldMissesColon => "This struct field misses a colon.",
CstError::StructFieldMissesKey => "This struct field misses a key.",
CstError::StructFieldMissesValue => "This struct field misses a value.",
CstError::StructNotClosed => "This struct is not closed.",
CstError::SymbolContainsNonAlphanumericAscii => {
"This symbol contains non-alphanumeric ASCII characters."
}
CstError::TextNotClosed => "This text isn't closed.",
CstError::TextNotSufficientlyIndented => "This text isn't sufficiently indented.",
CstError::TextInterpolationNotClosed => "This text interpolation isn't closed.",
CstError::TextInterpolationMissesExpression => {
"Here's a start of a text interpolation without an expression after it."
}
CstError::TooMuchWhitespace => "There is too much whitespace here.",
CstError::UnexpectedCharacters => "This is an unexpected character.",
CstError::UnparsedRest => "The parser couldn't parse this rest.",
CstError::WeirdWhitespace => "This is weird whitespace.",
CstError::WeirdWhitespaceInIndentation => {
"This is weird whitespace. Make sure to use indent using two spaces."
}
}
.to_string(),
CompilerErrorPayload::Ast(error) => match error {
AstError::ExpectedNameOrPatternInAssignment => {
"An assignment should have a name or pattern on the left side.".to_string()
}
AstError::ExpectedParameter => "A parameter should come here.".to_string(),
AstError::FunctionMissesClosingCurlyBrace => {
"This function doesn't have a closing curly brace.".to_string()
}
AstError::ListItemMissesComma => {
"This list item should be followed by a comma.".to_string()
}
AstError::ListMissesClosingParenthesis => {
"This list doesn't have a closing parenthesis.".to_string()
}
AstError::ListWithNonListItem => "This is not a list item.".to_string(),
AstError::OrPatternIsMissingIdentifiers {
identifier,
number_of_missing_captures,
..
} => {
format!(
"`{identifier}` is missing in {number_of_missing_captures} {} of this or-pattern.",
if number_of_missing_captures.get() == 1 { "sub-pattern" } else { "sub-patterns" },
)
}
AstError::ParenthesizedInPattern => {
"Parentheses are not allowed in patterns.".to_string()
}
AstError::ParenthesizedMissesClosingParenthesis => {
"This expression is parenthesized, but the closing parenthesis is missing."
.to_string()
}
AstError::PatternContainsInvalidExpression => {
"This type of expression is not allowed in patterns.".to_string()
}
AstError::PatternLiteralPartContainsInvalidExpression => {
"This type of expression is not allowed in this part of a pattern.".to_string()
}
AstError::PipeInPattern => "Pipes are not allowed in patterns.".to_string(),
AstError::StructKeyMissesColon => {
"This struct key should be followed by a colon.".to_string()
}
AstError::StructMissesClosingBrace => {
"This struct doesn't have a closing bracket.".to_string()
}
AstError::StructShorthandWithNotIdentifier => {
"Shorthand syntax in structs only supports identifiers.".to_string()
}
AstError::StructValueMissesComma => {
"This struct value should be followed by a comma.".to_string()
}
AstError::StructWithNonStructField => {
"Structs should only contain struct key.".to_string()
}
AstError::TextInterpolationMissesClosingCurlyBraces => {
"This text interpolation never ends.".to_string()
}
AstError::TextMissesClosingQuote => "This text never ends.".to_string(),
AstError::UnexpectedPunctuation => "This punctuation was unexpected.".to_string(),
},
CompilerErrorPayload::Hir(error) => match error {
HirError::NeedsWithWrongNumberOfArguments { num_args } => {
format!("`needs` accepts one or two arguments, but was called with {num_args} arguments. Its parameters are the `condition` and an optional `message`.")
}
HirError::PatternContainsCall => "Calls in patterns are not allowed.".to_string(),
HirError::PublicAssignmentInNotTopLevel => {
"Public assignments (:=) can only be used in top-level code.".to_string()
}
HirError::PublicAssignmentWithSameName { name } => {
format!("There already exists a public assignment (:=) named `{name}`.")
}
HirError::UnknownReference { name } => format!("`{name}` is not in scope."),
},
CompilerErrorPayload::Mir(error) => match error {
MirError::UseWithInvalidPath { module, path } => {
format!(
"{module} tries to `use` {path:?}, but that's an invalid path.",
)
}
MirError::UseHasTooManyParentNavigations { module, path } => format!("{module} tries to `use` {path:?}, but that has too many parent navigations. You can't navigate out of the current package (the module that also contains a `_package.candy` file)."),
MirError::ModuleNotFound { module, path } => format!(
"{module} tries to use {path:?}, but that module is not found.",
),
MirError::UseNotStaticallyResolvable { containing_module } => format!(
"A `use` in {containing_module} is not statically resolvable.",
),
MirError::ModuleHasCycle { cycle } => {
format!(
"There's a cycle in the used modules: {}",
cycle.iter().join(" → "),
)
}
},
};
write!(f, "{message}")
}
}
impl CompilerError {
pub fn to_related_information(&self) -> Vec<(Module, cst::Id, String)> {
match &self.payload {
CompilerErrorPayload::Ast(AstError::OrPatternIsMissingIdentifiers {
all_captures,
..
}) => all_captures
.iter()
.map(|capture| {
(
self.module.clone(),
capture.to_owned(),
"The identifier is bound here.".to_string(),
)
})
.collect(),
_ => vec![],
}
}
}
impl ToRichIr for CompilerError {
fn build_rich_ir(&self, builder: &mut RichIrBuilder) {
let range = builder.push(
format!(
"{} (span: {} – {})",
self.module, *self.span.start, *self.span.end,
),
None,
EnumSet::empty(),
);
builder.push_reference(
ReferenceKey::ModuleWithSpan(self.module.clone(), self.span.to_owned()),
range,
);
builder.push(format!(": {}", self.payload), None, EnumSet::empty());
}
}
|
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
// This code was creating an ICE in the MIR type checker. The reason
// is that we are reifying a reference to a function (`foo::<'x>`),
// which involves extracting its signature, but we were not
// normalizing the signature afterwards. As a result, we sometimes got
// errors around the `<u32 as Foo<'x>>::Value`, which can be
// normalized to `f64`.
#![allow(dead_code)]
trait Foo<'x> {
type Value;
}
impl<'x> Foo<'x> for u32 {
type Value = f64;
}
struct Providers<'x> {
foo: for<'y> fn(x: &'x u32, y: &'y u32) -> <u32 as Foo<'x>>::Value,
}
fn foo<'y, 'x: 'x>(x: &'x u32, y: &'y u32) -> <u32 as Foo<'x>>::Value {
*x as f64
}
fn main() {
Providers { foo };
}
|
// `last` menerima input iter dan menghasilkan `Option<T>` elemen terakhir
fn main() {
let a = [1, 2, 3];
assert_eq!(a.iter().last(), Some(&3));
// output `a.iter().last()`: Some(&3)
}
|
use hackscanner_lib::*;
use simplelog::TerminalMode;
/// Assert that the `ratings` contain a Rating with the path matching `path` and a rating matching `score`
///
/// If `equals_score` is `true` the rating has to exactly equal `score`, otherwise it can also be bigger
fn assert_contains_entry_with_score(
ratings: &[Rating<'_>],
score: isize,
path: &str,
equals_score: bool,
) {
let mut matching_rating: Option<&Rating<'_>> = None;
for rating in ratings {
let path_as_string = rating.entry().path().to_string_lossy().into_owned();
if path_as_string.contains(path) {
matching_rating = Some(rating);
if rating.rating() == score {
return;
} else if !equals_score && rating.rating() >= score {
return;
}
}
}
if let Some(rating) = matching_rating {
panic!(
"Must find file: Found file {:?} did not fulfill score {} (rating is {})",
rating.entry().path(),
score,
rating.rating()
)
}
panic!("Must find file matching {:?}", path)
}
/// Assert that none of the Ratings contain a path matching `path` and a rating bigger than 0
fn assert_not_contains_entry(ratings: &[Rating<'_>], path: &str) {
assert_not_contains_entry_with_score(ratings, 1, path)
}
/// Assert that none of the Ratings contain a path matching `path` and a rating equal to or bigger than `score`
fn assert_not_contains_entry_with_score(ratings: &[Rating<'_>], score: isize, path: &str) {
for rating in ratings {
let path_as_string = rating.entry().path().to_string_lossy().into_owned();
if path_as_string.contains(path) {
if rating.rating() >= score {
panic!(
"Must not find entry {:?} with rating {}",
rating.entry().path(),
rating.rating()
);
}
}
}
}
fn configure_logging(log_level_filter: simplelog::LevelFilter) {
let mut loggers: Vec<Box<dyn simplelog::SharedLogger>> = vec![];
let mut config = simplelog::Config::default();
config.time_format = Some("%H:%M:%S%.3f");
if let Some(core_logger) =
simplelog::TermLogger::new(log_level_filter, config, TerminalMode::Mixed)
{
loggers.push(core_logger);
} else {
loggers.push(simplelog::SimpleLogger::new(log_level_filter, config));
}
let _ = simplelog::CombinedLogger::init(loggers);
}
#[test]
fn run_rules_with_configuration_test() {
configure_logging(simplelog::LevelFilter::Error);
let configuration_file = format!(
"{}{}",
env!("CARGO_MANIFEST_DIR"),
"/tests/resources/rules/rules.yaml"
);
let rules = get_merged_rules(&configuration_file).unwrap();
let files = file_finder::find_files(format!("{}/tests", env!("CARGO_MANIFEST_DIR")), &rules);
let ratings = rate_entries(&files, &rules);
assert_not_contains_entry(&ratings, "/tests/resources/files/whitelist_me.php");
}
#[test]
fn run_builtin_rules_test() {
configure_logging(simplelog::LevelFilter::Error);
let rules = get_builtin_rules();
let files = file_finder::find_files(format!("{}/tests", env!("CARGO_MANIFEST_DIR")), &rules);
let ratings = rate_entries(&files, &rules);
assert_contains_entry_with_score(
&ratings,
Severity::CRITICAL as isize,
"/tests/resources/files/dezmond.php",
false,
);
assert_contains_entry_with_score(
&ratings,
Severity::MAJOR as isize,
"/tests/resources/files/tx_mocfilemanager.php",
false,
);
assert_contains_entry_with_score(
&ratings,
Severity::MAJOR as isize,
"/tests/resources/files/something.tx_mocfilemanager.php",
false,
);
assert_contains_entry_with_score(
&ratings,
Severity::NOTICE as isize,
"/tests/resources/files/eval-in-file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MAJOR as isize,
"tests/resources/files/multiple_violations.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MINOR as isize,
"tests/resources/files/typo3/fileadmin/user_upload/some_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MAJOR as isize,
"tests/resources/files/typo3/typo3conf/l10n/someext/some_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MINOR as isize,
"tests/resources/files/typo3/typo3temp/bad_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MINOR as isize,
"tests/resources/files/typo3/typo3temp/various_subdir/bad_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MINOR as isize,
"tests/resources/files/typo3/typo3temp/autoload-tests/bad_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::NOTICE as isize,
"tests/resources/files/typo3/typo3conf/bad.php",
true,
);
assert_contains_entry_with_score(&ratings, Severity::MAJOR as isize, "tests/resources/files/typo3/typo3conf/ext/static_info_tables/Classes/static_info_tables.php", false);
assert_not_contains_entry(
&ratings,
"tests/resources/files/typo3/typo3temp/Cache/allowed_file.php",
);
assert_not_contains_entry(
&ratings,
"tests/resources/files/typo3/typo3temp/var/Cache/allowed_file.php",
);
assert_not_contains_entry(
&ratings,
"tests/resources/files/typo3/typo3temp/autoload/autoload_allowed_file.php",
);
assert_not_contains_entry(
&ratings,
"tests/resources/files/typo3/typo3temp/autoload-tests/autoload_allowed_file.php",
);
assert_not_contains_entry(&ratings, "tests/resources/files/typo3/typo3temp/ExtensionManager/UpdateScripts/ext_update36596ab430661a78499d678a5bb65a9c.php");
assert_not_contains_entry(&ratings, "tests/resources/files/typo3/typo3temp/var/transient/ext_updatebac283f6edfa19007d6b23122ff69aeb.php");
assert_contains_entry_with_score(
&ratings,
Severity::MINOR as isize,
"tests/resources/files/typo3/typo3temp/autoload/autoload_subfolder/bad_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::MAJOR as isize,
"tests/resources/files/typo3/uploads/some_ext/bad_file.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::NOTICE as isize,
"tests/resources/files/typo3/uploads/tx_extensionbuilder/backups/notice_severity.php",
true,
);
assert_contains_entry_with_score(
&ratings,
Severity::NONE as isize,
"tests/resources/files/typo3/typo3/sysext/impexp/Tests/Functional/ImportFromVersionFourDotFive/PagesAndTtContentUploads/ImportInEmptyDatabaseTest.php",
true,
);
assert_not_contains_entry(
&ratings,
"tests/resources/files/typo3/uploads/tx_ext_with_php_in_name/index.html",
);
}
|
struct User {
id: i32,
}
impl User {
pub fn table_name() -> String {
"user".to_owned()
}
}
fn main() {
println!("{}", User::table_name());
}
|
#![cfg(target_arch = "wasm32")]
extern crate wasm_bindgen_test;
use wasm_bindgen_test::*;
use rsfoo;
wasm_bindgen_test_configure!(run_in_browser);
#[wasm_bindgen_test]
fn pass() {
assert_eq!(1 + 1, 2);
}
#[wasm_bindgen_test]
fn test() {
let res = rsfoo::greet("test");
assert_eq!(res, "Hey test, wasm says hello!");
} |
use fyrox::{
core::pool::Handle,
engine::resource_manager::ResourceManager,
scene::{node::Node, Scene},
};
pub struct Level {
root: Handle<Node>,
}
impl Level {
pub async fn new(resource_manager: ResourceManager, scene: &mut Scene) -> Self {
let root = resource_manager
.request_model("data/levels/level.rgs")
.await
.unwrap()
.instantiate(scene);
Self { root }
}
}
|
use crate::socket;
use serde::Deserialize;
use crate::database as db;
use deadpool_postgres::Pool;
use crate::utils::cache_short;
pub async fn user(user_id: db::UserID, pool: Pool)
-> Result<Box<dyn warp::Reply>, warp::Rejection>
{
let user = match db::user(pool, user_id).await? {
Some(info) => info,
None => return Ok(Box::new(warp::http::StatusCode::NOT_FOUND))
};
Ok(Box::new(cache_short(warp::reply::json(&user))))
}
#[derive(Deserialize)]
pub struct RenameUserRequest {
name: String,
picture: String,
}
pub const RENAME_USER_LIMIT: u64 =
("{'name':'','picture':''}".len() + db::MAX_USER_NAME_LENGTH + db::MAX_URL_LENGTH) as u64;
pub async fn rename_user(session_id: db::SessionID, request: RenameUserRequest, pool: Pool, socket_ctx: socket::Context)
-> Result<Box<dyn warp::Reply>, warp::Rejection>
{
let user_id = match db::session_user_id(pool.clone(), &session_id).await? {
Some(id) => id,
None => return Ok(Box::new(warp::http::StatusCode::UNAUTHORIZED))
};
if !db::valid_user_name(&request.name) {
return Ok(Box::new("name_invalid"));
}
if !db::valid_url(&request.picture) {
return Ok(Box::new("picture_invalid"));
}
if !db::rename_user(pool.clone(), user_id, &request.name, &request.picture).await? {
return Ok(Box::new("name_exists"));
}
let groups = db::user_group_ids(pool, user_id).await?;
socket_ctx.rename_user(groups, user_id, &request.name, &request.picture).await;
return Ok(Box::new(warp::http::StatusCode::NO_CONTENT))
}
pub async fn delete_user(session_id: db::SessionID, pool: Pool, socket_ctx: socket::Context)
-> Result<impl warp::Reply, warp::Rejection>
{
let user_id = match db::session_user_id(pool.clone(), &session_id).await? {
Some(id) => id,
None => return Ok(warp::http::StatusCode::UNAUTHORIZED)
};
let groups = db::user_group_ids(pool.clone(), user_id).await?;
db::delete_user(pool, user_id).await?;
socket_ctx.kick_user(user_id).await;
socket_ctx.delete_user(groups, user_id).await;
Ok(warp::http::StatusCode::NO_CONTENT)
}
pub async fn leave_group(group_id: db::GroupID, session_id: db::SessionID, pool: Pool, socket_ctx: socket::Context)
-> Result<impl warp::Reply, warp::Rejection>
{
let user_id = match db::session_user_id(pool.clone(), &session_id).await? {
Some(id) => id,
None => return Ok(warp::http::StatusCode::UNAUTHORIZED)
};
db::leave_group(pool.clone(), user_id, group_id).await?;
db::anonymize_messages(pool, user_id, group_id).await?;
socket_ctx.kick_user_from_group(user_id, group_id).await;
socket_ctx.delete_user(vec![group_id], user_id).await;
Ok(warp::http::StatusCode::NO_CONTENT)
}
|
use std::env;
use std::io::{self, BufRead};
struct VM {
memory: Vec<i64>,
ip: usize,
input: Vec<i64>,
output: Vec<i64>,
}
impl VM {
fn new(program: &Vec<i64>, input: Vec<i64>) -> Self {
VM {
memory: program.clone(),
ip: 0,
input,
output: Vec::new(),
}
}
fn arg(&self, i: u32) -> i64 {
let instruction = self.memory[self.ip];
let mode = (instruction / (10 * (10_i64.pow(i)))) % 10;
let val = self.memory[self.ip + i as usize];
match mode {
0 => self.memory[val as usize],
1 => val,
_ => panic!("{}", mode),
}
}
fn int3<F>(&mut self, f: F)
where
F: Fn(i64, i64) -> i64,
{
let l = self.memory[self.ip + 3];
self.memory[l as usize] = f(self.arg(1), self.arg(2));
self.ip += 4
}
fn step(&mut self) -> bool {
let instruction = self.memory[self.ip];
match instruction % 100 {
1 => self.int3(|a, b| a + b),
2 => self.int3(|a, b| a * b),
3 => {
let j = self.memory[self.ip + 1];
self.memory[j as usize] = self.input.pop().unwrap();
self.ip += 2
}
4 => {
self.output.push(self.arg(1));
self.ip += 2
}
5 => {
if self.arg(1) != 0 {
self.ip = self.arg(2) as usize
} else {
self.ip += 3;
}
}
6 => {
if self.arg(1) == 0 {
self.ip = self.arg(2) as usize
} else {
self.ip += 3;
}
}
7 => self.int3(|a, b| (a < b) as i64),
8 => self.int3(|a, b| (a == b) as i64),
99 => return false,
x => panic!("the discotheque: ip {}: {}", self.ip, x),
}
true
}
fn run(&mut self) {
loop {
if !self.step() {
break;
}
}
}
}
fn main() {
let args: Vec<String> = env::args().skip(1).collect();
let input = args.iter().map(|s| s.parse().unwrap()).collect();
let stdin = io::stdin();
let handle = stdin.lock();
let line = handle.lines().map(|l| l.unwrap()).next().unwrap();
let program: Vec<i64> = line.split(",").map(|s| s.parse().unwrap()).collect();
let mut vm = VM::new(&program, input);
vm.run();
/*
for (i, x) in vm.memory.iter().enumerate() {
println!("memory[{}] = {}", i, x);
}
*/
for x in vm.output {
println!("{}", x);
}
}
|
use yew::prelude::*;
pub struct Nodejs {}
pub enum Msg {}
impl Component for Nodejs {
type Message = Msg;
type Properties = ();
fn create(_: Self::Properties, _: ComponentLink<Self>) -> Self {
Nodejs {}
}
fn update(&mut self, _msg: Self::Message) -> ShouldRender {
true
}
fn change(&mut self, _: Self::Properties) -> ShouldRender {
false
}
fn view(&self) -> Html {
html! {
<div
style="font-size: 14px;"
>
<div
class="rounded p-3 text-light"
style="
background-color: rgb(47, 56, 61);
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
font-size: 14px;
padding: 2px 6px;
font-family: 'Roboto Mono', monospace;
"
>
<span class="code-keyword">{"var"}</span>{" express = "}<span class="code-require">{"require"}</span>{"("}<span class="code-string">{"'express'"}</span>{");"}
<br/>
<span class="code-keyword">{"var"}</span>{" app = express();"}
<br/>
<span class="code-keyword">{"var"}</span>{" jwt = "}<span class="code-require">{"require"}</span>{"("}<span class="code-string">{"'express-jwt'"}</span>{");"}
<br/>
<span class="code-keyword">{"var"}</span>{" jwks = "}<span class="code-require">{"require"}</span>{"("}<span class="code-string">{"'jwks-rsa'"}</span>{");"}
<br/>
<br/>
<span class="code-keyword">{"var"}</span>{" port = process.env.PORT || "}<span class="code-number">{"8080"}</span>{";"}
<br/>
<br/>
<span class="code-keyword">{"var"}</span>{" jwtCheck = jwt({"}
<br/>
<span class="tab-1">{"secret"}</span>{": jwks.expressJwtSecret({"}
<br/>
<span class="tab-2">{"cache"}</span>{": "}<span class="code-literal">{"true"}</span>{","}
<br/>
<span class="tab-2">{"rateLimit"}</span>{": "}<span class="code-literal">{"true"}</span>{","}
<br/>
<span class="tab-2">{"jwksRequestsPerMinute"}</span>{": "}<span class="code-number">{"5"}</span>{","}
<br/>
<span class="tab-2">{"jwksUri"}</span>{": "}<span class="code-string">{"'https://dev-r5y8heyf.au.auth0.com/.well-known/jwks.json'"}</span>
<br/>
<span class="tab-1">{"}),"}</span>
<br/>
<span class="tab-1">{"audience"}</span>{": "}<span class="code-string">{"'https://test-api/'"}</span>{","}
<br/>
<span class="tab-1">{"issuer"}</span>{": "}<span class="code-string">{"'https://dev-r5y8heyf.au.auth0.com/'"}</span>{","}
<br/>
<span class="tab-1">{"algorithms"}</span>{": ["}<span class="code-string">{"'RS256'"}</span>{"]"}
<br/>
{"});"}
<br/>
<br/>
{"app.use(jwtCheck);"}
<br/>
<br/>
{"app.get("}<span class="code-string">{"'/authorized'"}</span>{", "}<span class="hljs-function"><span class="code-keyword">{"function"}</span>{" ("}<span class="code-params">{"req, res"}</span>{") "}</span>{"{"}
<br/>
<span class="tab-1">{"res.send("}</span><span class="code-string">{"'Secured Resource'"}</span>{");"}
<br/>
{"});"}
<br/>
<br/>
{"app.listen(port);"}
</div>
</div>
}
}
}
|
use procon_reader::ProconReader;
fn main() {
let stdin = std::io::stdin();
let mut rd = ProconReader::new(stdin.lock());
let n: usize = rd.get();
let m: usize = rd.get();
let mut g = vec![vec![]; n];
for _ in 0..m {
let a: usize = rd.get();
let b: usize = rd.get();
let (a, b) = (a - 1, b - 1);
g[a].push(b);
}
let solve = |start: usize| -> usize {
let mut seen = vec![false; n];
use std::collections::VecDeque;
let mut q = VecDeque::new();
seen[start] = true;
q.push_back(start);
while let Some(v) = q.pop_front() {
for &u in &g[v] {
if !seen[u] {
seen[u] = true;
q.push_back(u);
}
}
}
seen.iter().filter(|f| **f).count()
};
let mut ans = 0;
for s in 0..n {
ans += solve(s);
}
println!("{}", ans);
}
|
// Copyright 2014 The Servo Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![allow(non_upper_case_globals)]
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::fmt;
use std::mem;
use std::ops;
use std::str;
use std::cmp::Ordering::{self, Equal};
use std::sync::Mutex;
use std::sync::atomic::AtomicIsize;
use std::sync::atomic::Ordering::SeqCst;
use string_cache_shared::{self, UnpackedAtom, Static, Inline, Dynamic, STATIC_ATOM_SET,
ENTRY_ALIGNMENT, copy_memory};
#[cfg(feature = "log-events")]
use event::Event;
#[cfg(not(feature = "log-events"))]
macro_rules! log (($e:expr) => (()));
const NB_BUCKETS: usize = 1 << 12; // 4096
const BUCKET_MASK: u64 = (1 << 12) - 1;
struct StringCache {
buckets: [Option<Box<StringCacheEntry>>; NB_BUCKETS],
}
lazy_static! {
static ref STRING_CACHE: Mutex<StringCache> = Mutex::new(StringCache::new());
}
struct StringCacheEntry {
next_in_bucket: Option<Box<StringCacheEntry>>,
hash: u64,
ref_count: AtomicIsize,
string: String,
}
impl StringCacheEntry {
fn new(next: Option<Box<StringCacheEntry>>, hash: u64, string_to_add: &str)
-> StringCacheEntry {
StringCacheEntry {
next_in_bucket: next,
hash: hash,
ref_count: AtomicIsize::new(1),
string: String::from(string_to_add),
}
}
}
impl StringCache {
fn new() -> StringCache {
StringCache {
buckets: unsafe { mem::zeroed() },
}
}
fn add(&mut self, string_to_add: &str, hash: u64) -> *mut StringCacheEntry {
let bucket_index = (hash & BUCKET_MASK) as usize;
{
let mut ptr: Option<&mut Box<StringCacheEntry>> =
self.buckets[bucket_index].as_mut();
while let Some(entry) = ptr.take() {
if entry.hash == hash && entry.string == string_to_add {
if entry.ref_count.fetch_add(1, SeqCst) > 0 {
return &mut **entry;
}
// Uh-oh. The pointer's reference count was zero, which means someone may try
// to free it. (Naive attempts to defend against this, for example having the
// destructor check to see whether the reference count is indeed zero, don't
// work due to ABA.) Thus we need to temporarily add a duplicate string to the
// list.
entry.ref_count.fetch_sub(1, SeqCst);
break;
}
ptr = entry.next_in_bucket.as_mut();
}
}
debug_assert!(mem::align_of::<StringCacheEntry>() >= ENTRY_ALIGNMENT);
let mut entry = Box::new(StringCacheEntry::new(
self.buckets[bucket_index].take(), hash, string_to_add));
let ptr: *mut StringCacheEntry = &mut *entry;
self.buckets[bucket_index] = Some(entry);
log!(Event::Insert(ptr as u64, String::from(string_to_add)));
ptr
}
fn remove(&mut self, key: u64) {
let ptr = key as *mut StringCacheEntry;
let bucket_index = {
let value: &StringCacheEntry = unsafe { &*ptr };
debug_assert!(value.ref_count.load(SeqCst) == 0);
(value.hash & BUCKET_MASK) as usize
};
let mut current: &mut Option<Box<StringCacheEntry>> = &mut self.buckets[bucket_index];
loop {
let entry_ptr: *mut StringCacheEntry = match current.as_mut() {
Some(entry) => &mut **entry,
None => break,
};
if entry_ptr == ptr {
mem::drop(mem::replace(current, unsafe { (*entry_ptr).next_in_bucket.take() }));
break;
}
current = unsafe { &mut (*entry_ptr).next_in_bucket };
}
log!(Event::Remove(key));
}
}
// NOTE: Deriving Eq here implies that a given string must always
// be interned the same way.
#[cfg_attr(feature = "unstable", unsafe_no_drop_flag)] // See tests::atom_drop_is_idempotent
#[cfg_attr(feature = "heap_size", derive(HeapSizeOf))]
#[derive(Eq, Hash, PartialEq)]
pub struct Atom {
/// This field is public so that the `atom!()` macro can use it.
/// You should not otherwise access this field.
pub data: u64,
}
impl Atom {
#[inline(always)]
unsafe fn unpack(&self) -> UnpackedAtom {
UnpackedAtom::from_packed(self.data)
}
#[inline]
pub fn from_slice(string_to_add: &str) -> Atom {
let unpacked = match STATIC_ATOM_SET.get_index_or_hash(string_to_add) {
Ok(id) => Static(id as u32),
Err(hash) => {
let len = string_to_add.len();
if len <= string_cache_shared::MAX_INLINE_LEN {
let mut buf: [u8; 7] = [0; 7];
copy_memory(string_to_add.as_bytes(), &mut buf);
Inline(len as u8, buf)
} else {
Dynamic(STRING_CACHE.lock().unwrap().add(string_to_add, hash) as *mut ())
}
}
};
let data = unsafe { unpacked.pack() };
log!(Event::Intern(data));
Atom { data: data }
}
#[inline]
pub fn as_slice<'t>(&'t self) -> &'t str {
unsafe {
match self.unpack() {
Inline(..) => {
let buf = string_cache_shared::inline_orig_bytes(&self.data);
str::from_utf8(buf).unwrap()
},
Static(idx) => STATIC_ATOM_SET.index(idx).expect("bad static atom"),
Dynamic(entry) => {
let entry = entry as *mut StringCacheEntry;
&(*entry).string
}
}
}
}
}
impl Clone for Atom {
#[inline(always)]
fn clone(&self) -> Atom {
unsafe {
match string_cache_shared::from_packed_dynamic(self.data) {
Some(entry) => {
let entry = entry as *mut StringCacheEntry;
(*entry).ref_count.fetch_add(1, SeqCst);
},
None => (),
}
}
Atom {
data: self.data
}
}
}
impl Drop for Atom {
#[inline]
fn drop(&mut self) {
// Out of line to guide inlining.
fn drop_slow(this: &mut Atom) {
STRING_CACHE.lock().unwrap().remove(this.data);
}
unsafe {
match string_cache_shared::from_packed_dynamic(self.data) {
Some(entry) => {
let entry = entry as *mut StringCacheEntry;
if (*entry).ref_count.fetch_sub(1, SeqCst) == 1 {
drop_slow(self);
}
}
_ => (),
}
}
}
}
impl ops::Deref for Atom {
type Target = str;
#[inline]
fn deref(&self) -> &str {
self.as_slice()
}
}
impl fmt::Display for Atom {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<str as fmt::Display>::fmt(self, f)
}
}
impl fmt::Debug for Atom {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let ty_str = unsafe {
match self.unpack() {
Dynamic(..) => "dynamic",
Inline(..) => "inline",
Static(..) => "static",
}
};
write!(f, "Atom('{}' type={})", self.as_slice(), ty_str)
}
}
impl PartialOrd for Atom {
#[inline]
fn partial_cmp(&self, other: &Atom) -> Option<Ordering> {
if self.data == other.data {
return Some(Equal);
}
self.as_slice().partial_cmp(other.as_slice())
}
}
impl Ord for Atom {
#[inline]
fn cmp(&self, other: &Atom) -> Ordering {
if self.data == other.data {
return Equal;
}
self.as_slice().cmp(other.as_slice())
}
}
impl AsRef<str> for Atom {
fn as_ref(&self) -> &str {
&self
}
}
impl Serialize for Atom {
fn serialize<S>(&self, serializer: &mut S) -> Result<(),S::Error> where S: Serializer {
let string: &str = self.as_ref();
string.serialize(serializer)
}
}
impl Deserialize for Atom {
fn deserialize<D>(deserializer: &mut D) -> Result<Atom,D::Error> where D: Deserializer {
let string: String = try!(Deserialize::deserialize(deserializer));
Ok(Atom::from_slice(&*string))
}
}
#[cfg(all(test, feature = "unstable"))]
mod bench;
#[cfg(test)]
mod tests {
use std::mem;
use std::thread;
use super::{Atom, StringCacheEntry};
use string_cache_shared::{Static, Inline, Dynamic, ENTRY_ALIGNMENT};
#[test]
fn test_as_slice() {
let s0 = Atom::from_slice("");
assert!(s0.as_slice() == "");
let s1 = Atom::from_slice("class");
assert!(s1.as_slice() == "class");
let i0 = Atom::from_slice("blah");
assert!(i0.as_slice() == "blah");
let s0 = Atom::from_slice("BLAH");
assert!(s0.as_slice() == "BLAH");
let d0 = Atom::from_slice("zzzzzzzzzz");
assert!(d0.as_slice() == "zzzzzzzzzz");
let d1 = Atom::from_slice("ZZZZZZZZZZ");
assert!(d1.as_slice() == "ZZZZZZZZZZ");
}
macro_rules! unpacks_to (($e:expr, $t:pat) => (
match unsafe { Atom::from_slice($e).unpack() } {
$t => (),
_ => panic!("atom has wrong type"),
}
));
#[test]
fn test_types() {
unpacks_to!("", Static(..));
unpacks_to!("id", Static(..));
unpacks_to!("body", Static(..));
unpacks_to!("c", Inline(..)); // "z" is a static atom
unpacks_to!("zz", Inline(..));
unpacks_to!("zzz", Inline(..));
unpacks_to!("zzzz", Inline(..));
unpacks_to!("zzzzz", Inline(..));
unpacks_to!("zzzzzz", Inline(..));
unpacks_to!("zzzzzzz", Inline(..));
unpacks_to!("zzzzzzzz", Dynamic(..));
unpacks_to!("zzzzzzzzzzzzz", Dynamic(..));
}
#[test]
fn test_equality() {
let s0 = Atom::from_slice("fn");
let s1 = Atom::from_slice("fn");
let s2 = Atom::from_slice("loop");
let i0 = Atom::from_slice("blah");
let i1 = Atom::from_slice("blah");
let i2 = Atom::from_slice("blah2");
let d0 = Atom::from_slice("zzzzzzzz");
let d1 = Atom::from_slice("zzzzzzzz");
let d2 = Atom::from_slice("zzzzzzzzz");
assert!(s0 == s1);
assert!(s0 != s2);
assert!(i0 == i1);
assert!(i0 != i2);
assert!(d0 == d1);
assert!(d0 != d2);
assert!(s0 != i0);
assert!(s0 != d0);
assert!(i0 != d0);
}
#[test]
fn ord() {
fn check(x: &str, y: &str) {
assert_eq!(x < y, Atom::from_slice(x) < Atom::from_slice(y));
assert_eq!(x.cmp(y), Atom::from_slice(x).cmp(&Atom::from_slice(y)));
assert_eq!(x.partial_cmp(y), Atom::from_slice(x).partial_cmp(&Atom::from_slice(y)));
}
check("a", "body");
check("asdf", "body");
check("zasdf", "body");
check("z", "body");
check("a", "bbbbb");
check("asdf", "bbbbb");
check("zasdf", "bbbbb");
check("z", "bbbbb");
}
#[test]
fn clone() {
let s0 = Atom::from_slice("fn");
let s1 = s0.clone();
let s2 = Atom::from_slice("loop");
let i0 = Atom::from_slice("blah");
let i1 = i0.clone();
let i2 = Atom::from_slice("blah2");
let d0 = Atom::from_slice("zzzzzzzz");
let d1 = d0.clone();
let d2 = Atom::from_slice("zzzzzzzzz");
assert!(s0 == s1);
assert!(s0 != s2);
assert!(i0 == i1);
assert!(i0 != i2);
assert!(d0 == d1);
assert!(d0 != d2);
assert!(s0 != i0);
assert!(s0 != d0);
assert!(i0 != d0);
}
macro_rules! assert_eq_fmt (($fmt:expr, $x:expr, $y:expr) => ({
let x = $x;
let y = $y;
if x != y {
panic!("assertion failed: {} != {}",
format_args!($fmt, x),
format_args!($fmt, y));
}
}));
#[test]
fn repr() {
fn check(s: &str, data: u64) {
assert_eq_fmt!("0x{:016X}", Atom::from_slice(s).data, data);
}
fn check_static(s: &str, x: Atom) {
use string_cache_shared::STATIC_ATOM_SET;
assert_eq_fmt!("0x{:016X}", x.data, Atom::from_slice(s).data);
assert_eq!(0x2, x.data & 0xFFFF_FFFF);
// The index is unspecified by phf.
assert!((x.data >> 32) <= STATIC_ATOM_SET.iter().len() as u64);
}
// This test is here to make sure we don't change atom representation
// by accident. It may need adjusting if there are changes to the
// static atom table, the tag values, etc.
// Static atoms
check_static("a", atom!(a));
check_static("address", atom!(address));
check_static("area", atom!(area));
// Inline atoms
check("e", 0x0000_0000_0000_6511);
check("xyzzy", 0x0000_797A_7A79_7851);
check("xyzzy01", 0x3130_797A_7A79_7871);
// Dynamic atoms. This is a pointer so we can't verify every bit.
assert_eq!(0x00, Atom::from_slice("a dynamic string").data & 0xf);
}
#[test]
fn assert_sizes() {
// Guard against accidental changes to the sizes of things.
use std::mem;
assert_eq!(if cfg!(feature = "unstable") { 8 } else { 16 }, mem::size_of::<super::Atom>());
assert_eq!(48, mem::size_of::<super::StringCacheEntry>());
}
#[test]
fn test_threads() {
for _ in 0_u32..100 {
thread::spawn(move || {
let _ = Atom::from_slice("a dynamic string");
let _ = Atom::from_slice("another string");
});
}
}
#[test]
fn atom_macro() {
assert_eq!(atom!(body), Atom::from_slice("body"));
assert_eq!(atom!("body"), Atom::from_slice("body"));
assert_eq!(atom!("font-weight"), Atom::from_slice("font-weight"));
}
#[test]
fn match_atom() {
assert_eq!(2, match Atom::from_slice("head") {
atom!(br) => 1,
atom!(html) | atom!(head) => 2,
_ => 3,
});
assert_eq!(3, match Atom::from_slice("body") {
atom!(br) => 1,
atom!(html) | atom!(head) => 2,
_ => 3,
});
assert_eq!(3, match Atom::from_slice("zzzzzz") {
atom!(br) => 1,
atom!(html) | atom!(head) => 2,
_ => 3,
});
}
#[test]
fn ensure_deref() {
// Ensure we can Deref to a &str
let atom = Atom::from_slice("foobar");
let _: &str = &atom;
}
#[test]
fn ensure_as_ref() {
// Ensure we can as_ref to a &str
let atom = Atom::from_slice("foobar");
let _: &str = atom.as_ref();
}
/// Atom uses #[unsafe_no_drop_flag] to stay small, so drop() may be called more than once.
/// In calls after the first one, the atom will be filled with a POST_DROP value.
/// drop() must be a no-op in this case.
#[cfg(feature = "unstable")]
#[test]
fn atom_drop_is_idempotent() {
use string_cache_shared::from_packed_dynamic;
unsafe {
assert_eq!(from_packed_dynamic(mem::POST_DROP_U64), None);
}
}
#[test]
fn string_cache_entry_alignment_is_sufficient() {
assert!(mem::align_of::<StringCacheEntry>() >= ENTRY_ALIGNMENT);
}
}
|
#![no_std]
#![no_main]
#[allow(unused)]
use panic_halt;
mod tnarx;
use core::fmt::Write;
use embedded_graphics::fonts::Font12x16;
use embedded_graphics::prelude::*;
use hd44780_driver::{Cursor, CursorBlink, HD44780};
use ili9341;
use shift_register_driver::sipo::ShiftRegister16;
use ssd1306::prelude::*;
use ssd1306::Builder;
use stm32f0xx_hal as hal;
use crate::hal::delay::Delay;
use crate::hal::i2c::I2c;
use crate::hal::prelude::*;
use crate::hal::spi::Spi;
use crate::hal::stm32;
use crate::hal::time::{Hertz, KiloHertz};
use crate::hal::timers::*;
use nb::block;
use cortex_m::peripheral::Peripherals;
use cortex_m_rt::entry;
use core::fmt::Debug;
use core::iter;
use embedded_hal;
#[entry]
fn main() -> ! {
let p = stm32::Peripherals::take().unwrap();
let cp = Peripherals::take().unwrap();
/* Constrain clocking registers */
let rcc = p.RCC.constrain();
/* Configure clock to 8 MHz (i.e. the default) and freeze it */
let clocks = rcc.cfgr.sysclk(48.mhz()).freeze();
let gpioa = p.GPIOA.split();
let gpiob = p.GPIOB.split();
let gpiof = p.GPIOF.split();
/* Get delay provider */
let mut delay = Delay::new(cp.SYST, clocks);
let mut timer = Timer::tim1(p.TIM1, Hertz(3), clocks);
// I think the lcd needs a bit to initialize
for _ in 0..10 {
block!(timer.wait()).ok();
}
let scl = gpioa
.pa9
.into_alternate_af4()
.internal_pull_up(true)
.set_open_drain();
let sda = gpioa
.pa10
.into_alternate_af4()
.internal_pull_up(true)
.set_open_drain();
let i2c = I2c::i2c1(p.I2C1, (scl, sda), KiloHertz(400));
// Configure pins for SPI
let sck = gpioa.pa5.into_alternate_af0();
let miso = gpioa.pa6.into_alternate_af0();
let mosi = gpioa.pa7.into_alternate_af0();
// Configure SPI with 100kHz rate
let spi = Spi::spi1(p.SPI1, (sck, miso, mosi), ili9341::MODE, 48.mhz(), clocks);
let cs = gpioa.pa2.into_push_pull_output();
let dc = gpioa.pa3.into_push_pull_output();
let reset = gpioa.pa4.into_push_pull_output();
let mut disp: GraphicsMode<_> = Builder::new()
.with_size(DisplaySize::Display128x32)
.connect_i2c(i2c)
.into();
disp.init().unwrap();
disp.flush().unwrap();
let mut disp_ili = ili9341::Ili9341::new(spi, cs, dc, reset, &mut delay).unwrap();
disp_ili
.set_orientation(ili9341::Orientation::LandscapeFlipped)
.unwrap();
clear(&mut disp_ili);
let clock = gpiof.pf1.into_push_pull_output();
let latch = gpiof.pf0.into_push_pull_output();
let data = gpiob.pb1.into_push_pull_output();
let shift_register = ShiftRegister16::new(clock, latch, data);
let mut outputs = shift_register.decompose();
let mut it = outputs.iter_mut();
let _ = it.next().unwrap();
let d4 = it.next().unwrap();
let d5 = it.next().unwrap();
let d6 = it.next().unwrap();
let d7 = it.next().unwrap();
let rs = it.next().unwrap();
let en = it.next().unwrap();
let _ = it.next().unwrap();
// Shift 1 Done
let _pcdrst = it.next().unwrap();
// this pin is unused
let _pcdled = it.next().unwrap();
let _ = it.next().unwrap();
let _pcddc = it.next().unwrap();
let _pcdce = it.next().unwrap();
let tnadi = it.next().unwrap();
let tnack = it.next().unwrap();
let tnace = it.next().unwrap();
// Shift 2 done
let mut disp_hd44780 = HD44780::new_4bit(rs, en, d4, d5, d6, d7, delay);
disp_hd44780.set_cursor_visibility(Cursor::Invisible);
disp_hd44780.set_cursor_blink(CursorBlink::Off);
let _pcddin = gpioa.pa1.into_push_pull_output();
let _pcdclk = gpioa.pa0.into_push_pull_output();
let mut disp_tna = tnarx::Tnarx::new(tnace, tnack, tnadi);
let text_ssd = [
"Consistent APIs",
"Under 16KiB",
"Highly Optimized",
"Cross-vendor APIs",
"Sane depedencies",
"Advanced features",
"Non-vendor specific",
];
let mut text_ssd_counter = 0;
let text_ili = [
"This is (mostly) based on existing libs",
"Source available on https://github.com/david-sawatzke/emrust-demo",
"Using embedded_hal, libraries can be easiliy used on all suported platforms",
"Register access is the same across families and even vendors",
"This uses embedded-hal, stm32f0xx-hal, svd2rust, embedded-graphics, shift-register-driver, the display drives, and (of course) rust",
];
let mut text_ili_counter = 0;
let text_hd = [
"Prevents race",
"conditions",
"Little-to-no",
"overhead",
"Checked register",
"access",
"No proprietary",
"code necessary",
];
let mut text_hd_counter = 0;
let text_tna = ["STABLE", "CHECKED", "SAFE", "FAST", "POWERFULL"];
let mut text_tna_counter = 0;
loop {
disp_hd44780.reset();
disp_hd44780.clear();
disp_hd44780.write_str(text_hd[text_hd_counter]);
// Move the cursor to the second line
disp_hd44780.set_cursor_pos(40);
disp_hd44780.write_str(text_hd[text_hd_counter + 1]);
text_hd_counter += 2;
if text_hd_counter == text_hd.len() {
text_hd_counter = 0;
}
disp.clear();
text(&mut disp, text_ssd[text_ssd_counter], 10, 2).unwrap();
text_ssd_counter += 1;
if text_ssd_counter == text_ssd.len() {
text_ssd_counter = 0;
}
disp.flush().unwrap();
clear(&mut disp_ili);
text(&mut disp_ili, text_ili[text_ili_counter], 26, 10).unwrap();
text_ili_counter += 1;
if text_ili_counter == text_ili.len() {
text_ili_counter = 0;
}
disp_tna.erase();
disp_tna.write_str(text_tna[text_tna_counter]);
text_tna_counter += 1;
if text_tna_counter == text_tna.len() {
text_tna_counter = 0;
}
disp_tna.flush();
// We (probably) have an overflow with 1Hz
for _ in 0..10 {
block!(timer.wait()).ok();
}
}
}
fn text<DISP, C>(disp: &mut DISP, text: &str, x: u8, y: u8) -> Result<(), ()>
where
DISP: Drawing<C>,
C: embedded_graphics::pixelcolor::PixelColor,
{
if text.len() > x as usize * y as usize {
return Err(());
}
let mut pos = 0;
let mut y_pos = 0;
while pos < text.len() {
let remaining = if x as usize <= text.len() - 1 - pos {
x as usize
} else {
text.len() - pos
};
disp.draw(
Font12x16::render_str(&text[pos..pos + remaining])
.with_stroke(Some(1u8.into()))
.translate(Coord::new(0, 16 * y_pos))
.into_iter(),
);
pos += remaining;
y_pos += 1;
}
Ok(())
}
fn clear<E, SPI, CS, DC, RESET>(disp: &mut ili9341::Ili9341<SPI, CS, DC, RESET>)
where
SPI: embedded_hal::blocking::spi::Transfer<u8, Error = E>
+ embedded_hal::blocking::spi::Write<u8, Error = E>,
SPI: embedded_hal::blocking::spi::Transfer<u8>,
SPI: embedded_hal::blocking::spi::Write<u8>,
CS: embedded_hal::digital::OutputPin,
DC: embedded_hal::digital::OutputPin,
RESET: embedded_hal::digital::OutputPin,
E: Debug,
{
let iterate = iter::repeat(0xFFFF).take(320 * 240);
disp.draw_iter(0, 0, 320, 240, iterate);
}
|
use clippy_utils::higher;
use clippy_utils::{
can_move_expr_to_closure_no_visit,
diagnostics::span_lint_and_sugg,
is_expr_final_block_expr, is_expr_used_or_unified, match_def_path, paths, peel_hir_expr_while,
source::{reindent_multiline, snippet_indent, snippet_with_applicability, snippet_with_context},
SpanlessEq,
};
use core::fmt::Write;
use rustc_errors::Applicability;
use rustc_hir::{
hir_id::HirIdSet,
intravisit::{walk_expr, ErasedMap, NestedVisitorMap, Visitor},
Block, Expr, ExprKind, Guard, HirId, Pat, Stmt, StmtKind, UnOp,
};
use rustc_lint::{LateContext, LateLintPass};
use rustc_session::{declare_lint_pass, declare_tool_lint};
use rustc_span::{Span, SyntaxContext, DUMMY_SP};
declare_clippy_lint! {
/// ### What it does
/// Checks for uses of `contains_key` + `insert` on `HashMap`
/// or `BTreeMap`.
///
/// ### Why is this bad?
/// Using `entry` is more efficient.
///
/// ### Known problems
/// The suggestion may have type inference errors in some cases. e.g.
/// ```rust
/// let mut map = std::collections::HashMap::new();
/// let _ = if !map.contains_key(&0) {
/// map.insert(0, 0)
/// } else {
/// None
/// };
/// ```
///
/// ### Example
/// ```rust
/// # use std::collections::HashMap;
/// # let mut map = HashMap::new();
/// # let k = 1;
/// # let v = 1;
/// if !map.contains_key(&k) {
/// map.insert(k, v);
/// }
/// ```
/// can both be rewritten as:
/// ```rust
/// # use std::collections::HashMap;
/// # let mut map = HashMap::new();
/// # let k = 1;
/// # let v = 1;
/// map.entry(k).or_insert(v);
/// ```
#[clippy::version = "pre 1.29.0"]
pub MAP_ENTRY,
perf,
"use of `contains_key` followed by `insert` on a `HashMap` or `BTreeMap`"
}
declare_lint_pass!(HashMapPass => [MAP_ENTRY]);
impl<'tcx> LateLintPass<'tcx> for HashMapPass {
#[allow(clippy::too_many_lines)]
fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
let (cond_expr, then_expr, else_expr) = match higher::If::hir(expr) {
Some(higher::If { cond, then, r#else }) => (cond, then, r#else),
_ => return,
};
let (map_ty, contains_expr) = match try_parse_contains(cx, cond_expr) {
Some(x) => x,
None => return,
};
let then_search = match find_insert_calls(cx, &contains_expr, then_expr) {
Some(x) => x,
None => return,
};
let mut app = Applicability::MachineApplicable;
let map_str = snippet_with_context(cx, contains_expr.map.span, contains_expr.call_ctxt, "..", &mut app).0;
let key_str = snippet_with_context(cx, contains_expr.key.span, contains_expr.call_ctxt, "..", &mut app).0;
let sugg = if let Some(else_expr) = else_expr {
let else_search = match find_insert_calls(cx, &contains_expr, else_expr) {
Some(search) => search,
None => return,
};
if then_search.edits.is_empty() && else_search.edits.is_empty() {
// No insertions
return;
} else if then_search.edits.is_empty() || else_search.edits.is_empty() {
// if .. { insert } else { .. } or if .. { .. } else { insert }
let ((then_str, entry_kind), else_str) = match (else_search.edits.is_empty(), contains_expr.negated) {
(true, true) => (
then_search.snippet_vacant(cx, then_expr.span, &mut app),
snippet_with_applicability(cx, else_expr.span, "{ .. }", &mut app),
),
(true, false) => (
then_search.snippet_occupied(cx, then_expr.span, &mut app),
snippet_with_applicability(cx, else_expr.span, "{ .. }", &mut app),
),
(false, true) => (
else_search.snippet_occupied(cx, else_expr.span, &mut app),
snippet_with_applicability(cx, then_expr.span, "{ .. }", &mut app),
),
(false, false) => (
else_search.snippet_vacant(cx, else_expr.span, &mut app),
snippet_with_applicability(cx, then_expr.span, "{ .. }", &mut app),
),
};
format!(
"if let {}::{} = {}.entry({}) {} else {}",
map_ty.entry_path(),
entry_kind,
map_str,
key_str,
then_str,
else_str,
)
} else {
// if .. { insert } else { insert }
let ((then_str, then_entry), (else_str, else_entry)) = if contains_expr.negated {
(
then_search.snippet_vacant(cx, then_expr.span, &mut app),
else_search.snippet_occupied(cx, else_expr.span, &mut app),
)
} else {
(
then_search.snippet_occupied(cx, then_expr.span, &mut app),
else_search.snippet_vacant(cx, else_expr.span, &mut app),
)
};
let indent_str = snippet_indent(cx, expr.span);
let indent_str = indent_str.as_deref().unwrap_or("");
format!(
"match {}.entry({}) {{\n{indent} {entry}::{} => {}\n\
{indent} {entry}::{} => {}\n{indent}}}",
map_str,
key_str,
then_entry,
reindent_multiline(then_str.into(), true, Some(4 + indent_str.len())),
else_entry,
reindent_multiline(else_str.into(), true, Some(4 + indent_str.len())),
entry = map_ty.entry_path(),
indent = indent_str,
)
}
} else {
if then_search.edits.is_empty() {
// no insertions
return;
}
// if .. { insert }
if !then_search.allow_insert_closure {
let (body_str, entry_kind) = if contains_expr.negated {
then_search.snippet_vacant(cx, then_expr.span, &mut app)
} else {
then_search.snippet_occupied(cx, then_expr.span, &mut app)
};
format!(
"if let {}::{} = {}.entry({}) {}",
map_ty.entry_path(),
entry_kind,
map_str,
key_str,
body_str,
)
} else if let Some(insertion) = then_search.as_single_insertion() {
let value_str = snippet_with_context(cx, insertion.value.span, then_expr.span.ctxt(), "..", &mut app).0;
if contains_expr.negated {
if insertion.value.can_have_side_effects() {
format!("{}.entry({}).or_insert_with(|| {});", map_str, key_str, value_str)
} else {
format!("{}.entry({}).or_insert({});", map_str, key_str, value_str)
}
} else {
// TODO: suggest using `if let Some(v) = map.get_mut(k) { .. }` here.
// This would need to be a different lint.
return;
}
} else {
let block_str = then_search.snippet_closure(cx, then_expr.span, &mut app);
if contains_expr.negated {
format!("{}.entry({}).or_insert_with(|| {});", map_str, key_str, block_str)
} else {
// TODO: suggest using `if let Some(v) = map.get_mut(k) { .. }` here.
// This would need to be a different lint.
return;
}
}
};
span_lint_and_sugg(
cx,
MAP_ENTRY,
expr.span,
&format!("usage of `contains_key` followed by `insert` on a `{}`", map_ty.name()),
"try this",
sugg,
app,
);
}
}
#[derive(Clone, Copy)]
enum MapType {
Hash,
BTree,
}
impl MapType {
fn name(self) -> &'static str {
match self {
Self::Hash => "HashMap",
Self::BTree => "BTreeMap",
}
}
fn entry_path(self) -> &'static str {
match self {
Self::Hash => "std::collections::hash_map::Entry",
Self::BTree => "std::collections::btree_map::Entry",
}
}
}
struct ContainsExpr<'tcx> {
negated: bool,
map: &'tcx Expr<'tcx>,
key: &'tcx Expr<'tcx>,
call_ctxt: SyntaxContext,
}
fn try_parse_contains(cx: &LateContext<'_>, expr: &'tcx Expr<'_>) -> Option<(MapType, ContainsExpr<'tcx>)> {
let mut negated = false;
let expr = peel_hir_expr_while(expr, |e| match e.kind {
ExprKind::Unary(UnOp::Not, e) => {
negated = !negated;
Some(e)
},
_ => None,
});
match expr.kind {
ExprKind::MethodCall(
_,
_,
[
map,
Expr {
kind: ExprKind::AddrOf(_, _, key),
span: key_span,
..
},
],
_,
) if key_span.ctxt() == expr.span.ctxt() => {
let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?;
let expr = ContainsExpr {
negated,
map,
key,
call_ctxt: expr.span.ctxt(),
};
if match_def_path(cx, id, &paths::BTREEMAP_CONTAINS_KEY) {
Some((MapType::BTree, expr))
} else if match_def_path(cx, id, &paths::HASHMAP_CONTAINS_KEY) {
Some((MapType::Hash, expr))
} else {
None
}
},
_ => None,
}
}
struct InsertExpr<'tcx> {
map: &'tcx Expr<'tcx>,
key: &'tcx Expr<'tcx>,
value: &'tcx Expr<'tcx>,
}
fn try_parse_insert(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) -> Option<InsertExpr<'tcx>> {
if let ExprKind::MethodCall(_, _, [map, key, value], _) = expr.kind {
let id = cx.typeck_results().type_dependent_def_id(expr.hir_id)?;
if match_def_path(cx, id, &paths::BTREEMAP_INSERT) || match_def_path(cx, id, &paths::HASHMAP_INSERT) {
Some(InsertExpr { map, key, value })
} else {
None
}
} else {
None
}
}
/// An edit that will need to be made to move the expression to use the entry api
#[derive(Clone, Copy)]
enum Edit<'tcx> {
/// A semicolon that needs to be removed. Used to create a closure for `insert_with`.
RemoveSemi(Span),
/// An insertion into the map.
Insertion(Insertion<'tcx>),
}
impl Edit<'tcx> {
fn as_insertion(self) -> Option<Insertion<'tcx>> {
if let Self::Insertion(i) = self { Some(i) } else { None }
}
}
#[derive(Clone, Copy)]
struct Insertion<'tcx> {
call: &'tcx Expr<'tcx>,
value: &'tcx Expr<'tcx>,
}
/// This visitor needs to do a multiple things:
/// * Find all usages of the map. An insertion can only be made before any other usages of the map.
/// * Determine if there's an insertion using the same key. There's no need for the entry api
/// otherwise.
/// * Determine if the final statement executed is an insertion. This is needed to use
/// `or_insert_with`.
/// * Determine if there's any sub-expression that can't be placed in a closure.
/// * Determine if there's only a single insert statement. `or_insert` can be used in this case.
#[allow(clippy::struct_excessive_bools)]
struct InsertSearcher<'cx, 'tcx> {
cx: &'cx LateContext<'tcx>,
/// The map expression used in the contains call.
map: &'tcx Expr<'tcx>,
/// The key expression used in the contains call.
key: &'tcx Expr<'tcx>,
/// The context of the top level block. All insert calls must be in the same context.
ctxt: SyntaxContext,
/// Whether this expression can be safely moved into a closure.
allow_insert_closure: bool,
/// Whether this expression can use the entry api.
can_use_entry: bool,
/// Whether this expression is the final expression in this code path. This may be a statement.
in_tail_pos: bool,
// Is this expression a single insert. A slightly better suggestion can be made in this case.
is_single_insert: bool,
/// If the visitor has seen the map being used.
is_map_used: bool,
/// The locations where changes need to be made for the suggestion.
edits: Vec<Edit<'tcx>>,
/// A stack of loops the visitor is currently in.
loops: Vec<HirId>,
/// Local variables created in the expression. These don't need to be captured.
locals: HirIdSet,
}
impl<'tcx> InsertSearcher<'_, 'tcx> {
/// Visit the expression as a branch in control flow. Multiple insert calls can be used, but
/// only if they are on separate code paths. This will return whether the map was used in the
/// given expression.
fn visit_cond_arm(&mut self, e: &'tcx Expr<'_>) -> bool {
let is_map_used = self.is_map_used;
let in_tail_pos = self.in_tail_pos;
self.visit_expr(e);
let res = self.is_map_used;
self.is_map_used = is_map_used;
self.in_tail_pos = in_tail_pos;
res
}
/// Visits an expression which is not itself in a tail position, but other sibling expressions
/// may be. e.g. if conditions
fn visit_non_tail_expr(&mut self, e: &'tcx Expr<'_>) {
let in_tail_pos = self.in_tail_pos;
self.in_tail_pos = false;
self.visit_expr(e);
self.in_tail_pos = in_tail_pos;
}
}
impl<'tcx> Visitor<'tcx> for InsertSearcher<'_, 'tcx> {
type Map = ErasedMap<'tcx>;
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {
NestedVisitorMap::None
}
fn visit_stmt(&mut self, stmt: &'tcx Stmt<'_>) {
match stmt.kind {
StmtKind::Semi(e) => {
self.visit_expr(e);
if self.in_tail_pos && self.allow_insert_closure {
// The spans are used to slice the top level expression into multiple parts. This requires that
// they all come from the same part of the source code.
if stmt.span.ctxt() == self.ctxt && e.span.ctxt() == self.ctxt {
self.edits
.push(Edit::RemoveSemi(stmt.span.trim_start(e.span).unwrap_or(DUMMY_SP)));
} else {
self.allow_insert_closure = false;
}
}
},
StmtKind::Expr(e) => self.visit_expr(e),
StmtKind::Local(l) => {
self.visit_pat(l.pat);
if let Some(e) = l.init {
self.allow_insert_closure &= !self.in_tail_pos;
self.in_tail_pos = false;
self.is_single_insert = false;
self.visit_expr(e);
}
},
StmtKind::Item(_) => {
self.allow_insert_closure &= !self.in_tail_pos;
self.is_single_insert = false;
},
}
}
fn visit_block(&mut self, block: &'tcx Block<'_>) {
// If the block is in a tail position, then the last expression (possibly a statement) is in the
// tail position. The rest, however, are not.
match (block.stmts, block.expr) {
([], None) => {
self.allow_insert_closure &= !self.in_tail_pos;
},
([], Some(expr)) => self.visit_expr(expr),
(stmts, Some(expr)) => {
let in_tail_pos = self.in_tail_pos;
self.in_tail_pos = false;
for stmt in stmts {
self.visit_stmt(stmt);
}
self.in_tail_pos = in_tail_pos;
self.visit_expr(expr);
},
([stmts @ .., stmt], None) => {
let in_tail_pos = self.in_tail_pos;
self.in_tail_pos = false;
for stmt in stmts {
self.visit_stmt(stmt);
}
self.in_tail_pos = in_tail_pos;
self.visit_stmt(stmt);
},
}
}
fn visit_expr(&mut self, expr: &'tcx Expr<'_>) {
if !self.can_use_entry {
return;
}
match try_parse_insert(self.cx, expr) {
Some(insert_expr) if SpanlessEq::new(self.cx).eq_expr(self.map, insert_expr.map) => {
// Multiple inserts, inserts with a different key, and inserts from a macro can't use the entry api.
if self.is_map_used
|| !SpanlessEq::new(self.cx).eq_expr(self.key, insert_expr.key)
|| expr.span.ctxt() != self.ctxt
{
self.can_use_entry = false;
return;
}
self.edits.push(Edit::Insertion(Insertion {
call: expr,
value: insert_expr.value,
}));
self.is_map_used = true;
self.allow_insert_closure &= self.in_tail_pos;
// The value doesn't affect whether there is only a single insert expression.
let is_single_insert = self.is_single_insert;
self.visit_non_tail_expr(insert_expr.value);
self.is_single_insert = is_single_insert;
},
_ if SpanlessEq::new(self.cx).eq_expr(self.map, expr) => {
self.is_map_used = true;
},
_ => match expr.kind {
ExprKind::If(cond_expr, then_expr, Some(else_expr)) => {
self.is_single_insert = false;
self.visit_non_tail_expr(cond_expr);
// Each branch may contain it's own insert expression.
let mut is_map_used = self.visit_cond_arm(then_expr);
is_map_used |= self.visit_cond_arm(else_expr);
self.is_map_used = is_map_used;
},
ExprKind::Match(scrutinee_expr, arms, _) => {
self.is_single_insert = false;
self.visit_non_tail_expr(scrutinee_expr);
// Each branch may contain it's own insert expression.
let mut is_map_used = self.is_map_used;
for arm in arms {
self.visit_pat(arm.pat);
if let Some(Guard::If(guard) | Guard::IfLet(_, guard)) = arm.guard {
self.visit_non_tail_expr(guard);
}
is_map_used |= self.visit_cond_arm(arm.body);
}
self.is_map_used = is_map_used;
},
ExprKind::Loop(block, ..) => {
self.loops.push(expr.hir_id);
self.is_single_insert = false;
self.allow_insert_closure &= !self.in_tail_pos;
// Don't allow insertions inside of a loop.
let edit_len = self.edits.len();
self.visit_block(block);
if self.edits.len() != edit_len {
self.can_use_entry = false;
}
self.loops.pop();
},
ExprKind::Block(block, _) => self.visit_block(block),
ExprKind::InlineAsm(_) | ExprKind::LlvmInlineAsm(_) => {
self.can_use_entry = false;
},
_ => {
self.allow_insert_closure &= !self.in_tail_pos;
self.allow_insert_closure &=
can_move_expr_to_closure_no_visit(self.cx, expr, &self.loops, &self.locals);
// Sub expressions are no longer in the tail position.
self.is_single_insert = false;
self.in_tail_pos = false;
walk_expr(self, expr);
},
},
}
}
fn visit_pat(&mut self, p: &'tcx Pat<'tcx>) {
p.each_binding_or_first(&mut |_, id, _, _| {
self.locals.insert(id);
});
}
}
struct InsertSearchResults<'tcx> {
edits: Vec<Edit<'tcx>>,
allow_insert_closure: bool,
is_single_insert: bool,
}
impl InsertSearchResults<'tcx> {
fn as_single_insertion(&self) -> Option<Insertion<'tcx>> {
self.is_single_insert.then(|| self.edits[0].as_insertion().unwrap())
}
fn snippet(
&self,
cx: &LateContext<'_>,
mut span: Span,
app: &mut Applicability,
write_wrapped: impl Fn(&mut String, Insertion<'_>, SyntaxContext, &mut Applicability),
) -> String {
let ctxt = span.ctxt();
let mut res = String::new();
for insertion in self.edits.iter().filter_map(|e| e.as_insertion()) {
res.push_str(&snippet_with_applicability(
cx,
span.until(insertion.call.span),
"..",
app,
));
if is_expr_used_or_unified(cx.tcx, insertion.call) {
write_wrapped(&mut res, insertion, ctxt, app);
} else {
let _ = write!(
res,
"e.insert({})",
snippet_with_context(cx, insertion.value.span, ctxt, "..", app).0
);
}
span = span.trim_start(insertion.call.span).unwrap_or(DUMMY_SP);
}
res.push_str(&snippet_with_applicability(cx, span, "..", app));
res
}
fn snippet_occupied(&self, cx: &LateContext<'_>, span: Span, app: &mut Applicability) -> (String, &'static str) {
(
self.snippet(cx, span, app, |res, insertion, ctxt, app| {
// Insertion into a map would return `Some(&mut value)`, but the entry returns `&mut value`
let _ = write!(
res,
"Some(e.insert({}))",
snippet_with_context(cx, insertion.value.span, ctxt, "..", app).0
);
}),
"Occupied(mut e)",
)
}
fn snippet_vacant(&self, cx: &LateContext<'_>, span: Span, app: &mut Applicability) -> (String, &'static str) {
(
self.snippet(cx, span, app, |res, insertion, ctxt, app| {
// Insertion into a map would return `None`, but the entry returns a mutable reference.
let _ = if is_expr_final_block_expr(cx.tcx, insertion.call) {
write!(
res,
"e.insert({});\n{}None",
snippet_with_context(cx, insertion.value.span, ctxt, "..", app).0,
snippet_indent(cx, insertion.call.span).as_deref().unwrap_or(""),
)
} else {
write!(
res,
"{{ e.insert({}); None }}",
snippet_with_context(cx, insertion.value.span, ctxt, "..", app).0,
)
};
}),
"Vacant(e)",
)
}
fn snippet_closure(&self, cx: &LateContext<'_>, mut span: Span, app: &mut Applicability) -> String {
let ctxt = span.ctxt();
let mut res = String::new();
for edit in &self.edits {
match *edit {
Edit::Insertion(insertion) => {
// Cut out the value from `map.insert(key, value)`
res.push_str(&snippet_with_applicability(
cx,
span.until(insertion.call.span),
"..",
app,
));
res.push_str(&snippet_with_context(cx, insertion.value.span, ctxt, "..", app).0);
span = span.trim_start(insertion.call.span).unwrap_or(DUMMY_SP);
},
Edit::RemoveSemi(semi_span) => {
// Cut out the semicolon. This allows the value to be returned from the closure.
res.push_str(&snippet_with_applicability(cx, span.until(semi_span), "..", app));
span = span.trim_start(semi_span).unwrap_or(DUMMY_SP);
},
}
}
res.push_str(&snippet_with_applicability(cx, span, "..", app));
res
}
}
fn find_insert_calls(
cx: &LateContext<'tcx>,
contains_expr: &ContainsExpr<'tcx>,
expr: &'tcx Expr<'_>,
) -> Option<InsertSearchResults<'tcx>> {
let mut s = InsertSearcher {
cx,
map: contains_expr.map,
key: contains_expr.key,
ctxt: expr.span.ctxt(),
edits: Vec::new(),
is_map_used: false,
allow_insert_closure: true,
can_use_entry: true,
in_tail_pos: true,
is_single_insert: true,
loops: Vec::new(),
locals: HirIdSet::default(),
};
s.visit_expr(expr);
let allow_insert_closure = s.allow_insert_closure;
let is_single_insert = s.is_single_insert;
let edits = s.edits;
s.can_use_entry.then(|| InsertSearchResults {
edits,
allow_insert_closure,
is_single_insert,
})
}
|
use super::{
boolean::{False, True},
private::Sealed,
};
/// Type-level negation (NOT).
pub trait Negation: Sealed {
/// Logical conclusion of the negation of `Self`.
type Output;
}
/// Type-level conjunction (AND).
pub trait Conjunction<L>: Sealed {
/// Logical conclusion of the conjunction of `Self` and `L`.
type Output;
}
/// Type-level disjunction (OR).
pub trait Disjunction<L>: Sealed {
/// Logical conclusion of the disjunction of `Self` and `L`.
type Output;
}
/// Syntactic sugar for Negation.
pub type Not<A> = <A as Negation>::Output;
/// Syntactic sugar for Conjunction.
pub type And<L, R> = <L as Conjunction<R>>::Output;
/// Syntactic sugar for Disjunction.
pub type Or<L, R> = <L as Disjunction<R>>::Output;
/// Exclusive-OR of `L` and `R`.
pub type Xor<L, R> = Or<And<L, Not<R>>, And<Not<L>, R>>;
/// Logical implication.
pub type Imp<L, R> = Or<Not<L>, R>;
/// Logical bi-implication.
pub type Bimp<L, R> = And<Imp<L, R>, Imp<R, L>>;
impl Negation for True {
type Output = False;
}
impl Negation for False {
type Output = True;
}
impl Conjunction<False> for False {
type Output = False;
}
impl Conjunction<True> for False {
type Output = False;
}
impl Conjunction<False> for True {
type Output = False;
}
impl Conjunction<True> for True {
type Output = True;
}
impl Disjunction<False> for False {
type Output = False;
}
impl Disjunction<True> for False {
type Output = True;
}
impl Disjunction<False> for True {
type Output = True;
}
impl Disjunction<True> for True {
type Output = True;
}
|
#![allow(non_camel_case_types)]
#![allow(dead_code)]
#![allow(missing_copy_implementations)]
use std::ffi::CString;
use std::mem;
use std::slice;
use std::str;
use cql_ffi::value::CassValue;
use cql_ffi::error::CassError;
use cql_ffi::collection::map::MapIterator;
use cql_ffi::collection::set::SetIterator;
//use cql_ffi::udt::CassDataType;
use cql_ffi::udt::CassConstDataType;
use cql_bindgen::CassSchema as _CassSchema;
use cql_bindgen::CassSchemaMeta as _CassSchemaMeta;
use cql_bindgen::CassSchemaMetaField as _CassSchemaMetaField;
use cql_bindgen::cass_schema_meta_field_value;
use cql_bindgen::cass_schema_meta_field_name;
use cql_bindgen::cass_schema_meta_get_entry;
use cql_bindgen::cass_schema_meta_get_field;
use cql_bindgen::cass_schema_free;
use cql_bindgen::cass_schema_get_keyspace;
use cql_bindgen::cass_schema_meta_type;
use cql_bindgen::cass_iterator_from_schema;
use cql_bindgen::cass_iterator_from_schema_meta;
use cql_bindgen::cass_iterator_fields_from_schema_meta;
use cql_bindgen::cass_schema_get_udt;
//use cql_bindgen::cass_schema_get_udt_n;
pub struct CassSchema(pub *const _CassSchema);
pub struct CassSchemaMeta(pub *const _CassSchemaMeta);
pub struct CassSchemaMetaField(pub *const _CassSchemaMetaField);
//pub struct CassSchemaMetaType(pub _CassSchemaMetaType);
pub struct CassSchemaMetaFieldIterator(pub *mut SetIterator);
//~ #[repr(C)]
#[derive(Debug,Copy,Clone)]
pub enum CassSchemaMetaType {
KEYSPACE = 0isize,
TABLE = 1,
COLUMN = 2,
}
//~ impl Iterator for CassSchemaMetaFieldIterator {
//~ type Item = CassSchemaMeta;
//~ fn next(&mut self) -> Option<<Self as Iterator>::Item> {unsafe{
//~ match self.0.next() {
//~ Some(field) => Some(CassSchemaMeta(self.0.get_schema_meta_field())),
//~ None => None
//~ }}
//~ }
//~ }
impl CassSchemaMetaType {
pub fn build(val: isize) -> Result<Self, CassError> {
match val {
0 => Ok(CassSchemaMetaType::KEYSPACE),
1 => Ok(CassSchemaMetaType::TABLE),
2 => Ok(CassSchemaMetaType::COLUMN),
_ => panic!("impossible schema meta type"),
}
}
}
impl CassSchema {
pub fn get_keyspace(&self, keyspace_name: &str) -> CassSchemaMeta {
unsafe {
let keyspace_name = CString::new(keyspace_name).unwrap();
CassSchemaMeta(cass_schema_get_keyspace(self.0, keyspace_name.as_ptr()))
}
}
pub fn get_udt<S>(&self, keyspace: S, type_name: S) -> CassConstDataType
where S: Into<String>
{
unsafe {
let keyspace = CString::new(keyspace.into()).unwrap();
let type_name = CString::new(type_name.into()).unwrap();
CassConstDataType(cass_schema_get_udt(self.0, keyspace.as_ptr(), type_name.as_ptr()))
}
}
pub unsafe fn iterator(&self) -> SetIterator {
SetIterator(cass_iterator_from_schema(self.0))
}
}
impl Drop for CassSchema {
fn drop(&mut self) {
unsafe {
cass_schema_free(self.0)
}
}
}
impl CassSchemaMeta {
pub fn get_type(&self) -> Result<CassSchemaMetaType, CassError> {
unsafe {
CassSchemaMetaType::build(cass_schema_meta_type(self.0) as isize)
}
}
pub fn get_entry(&self, name: &str) -> CassSchemaMeta {
unsafe {
let name = CString::new(name).unwrap();
CassSchemaMeta(cass_schema_meta_get_entry(self.0, name.as_ptr()))
}
}
pub fn get_field(&self, name: &str) -> CassSchemaMetaField {
unsafe {
let name = CString::new(name).unwrap();
CassSchemaMetaField(cass_schema_meta_get_field(self.0, name.as_ptr()))
}
}
pub fn fields_from_schema_meta(&self) -> SetIterator {
unsafe {
SetIterator(cass_iterator_fields_from_schema_meta(self.0))
}
}
//~ fn is_null(&self) -> bool {unsafe{
//~ if cass_value_is_null(self.0) > 0 {true} else {false}
//~ }}
pub fn iterator(&self) -> SetIterator {
unsafe {
SetIterator(cass_iterator_from_schema_meta(self.0))
}
}
pub fn fields_iterator(&self) -> MapIterator {
unsafe {
MapIterator(cass_iterator_fields_from_schema_meta(self.0))
}
}
}
impl CassSchemaMetaField {
pub fn get_name(&self) -> String {
unsafe {
let mut name = mem::zeroed();
let mut name_length = mem::zeroed();
cass_schema_meta_field_name(self.0, &mut name, &mut name_length);
let slice = slice::from_raw_parts(name as *const u8, name_length as usize);
str::from_utf8(slice).unwrap().to_owned()
}
}
pub fn get_value(&self) -> CassValue {
unsafe {
CassValue::new(cass_schema_meta_field_value(self.0))
}
}
}
|
use std::cmp::{max, min};
use std::collections::{HashMap, HashSet};
use itertools::Itertools;
use whiteread::parse_line;
// FIXME: すべてのテストケースに通らない
// dfs 深さ優先探索
fn main() {
let (n, q): (usize, usize) = parse_line().unwrap();
// 0が余分にある
let mut tree: Vec<Vec<usize>> = vec![vec![]; n + 1];
let mut ctree: Vec<u64> = vec![0; n + 1];
for _ in 0..n - 1 {
let (a, b): (usize, usize) = parse_line().unwrap();
tree[a].push(b);
}
for _ in 0..q {
let (p, x): (usize, u64) = parse_line().unwrap();
ctree[p] += x;
}
let mut queue = vec![1];
while !queue.is_empty() {
let target = queue.pop().unwrap();
queue.extend(tree[target].clone());
for c in tree[target].iter() {
ctree[*c] += ctree[target];
}
}
for c in ctree.iter().skip(1).take(n - 1) {
print!("{} ", c);
}
println!("{}", &ctree.last().unwrap());
}
|
#[derive(Debug)]
#[allow(dead_code)]
struct Rectangle {
width: u32,
height: u32,
}
#[allow(dead_code)]
impl Rectangle {
fn can_hold(&self, other: &Rectangle) -> bool {
self.width > other.width && self.height > other.height
}
}
pub fn add_two(a: i32) -> i32 {
a + 2
}
pub fn greeting(name: &str) -> String {
format!("Hello {}!", name)
}
#[allow(dead_code)]
pub struct Guess {
value: i32,
}
#[allow(dead_code)]
impl Guess {
pub fn new(value: i32) -> Guess {
if value < 1 {
panic!("Guess value must be greater than or equal to 1, got {}.",
value);
} else if value > 100 {
panic!("Guess value must be less than or equal to 100, got {}.",
value);
}
Guess {
value
}
}
}
#[cfg(test)]
mod tests {
// #[test]
// fn it_works() {
// assert_eq!(2 + 2, 4);
// }
// #[test]
// fn another() {
// panic!("Make this test fail");
// }
use super::*;
#[test]
fn larger_can_hold_smaller() {
let larger = Rectangle { width: 8, height: 7 };
let smaller = Rectangle { width: 5, height: 1 };
assert!(larger.can_hold(&smaller));
}
#[test]
fn smaller_cannot_hold_larger() {
let larger = Rectangle { width: 8, height: 7 };
let smaller = Rectangle { width: 5, height: 1 };
assert!(!smaller.can_hold(&larger));
}
#[test]
fn it_adds_two() {
assert_eq!(4, add_two(2));
}
/*
The requirements for this program haven’t been agreed upon yet, and we’re
pretty sure the Hello text at the beginning of the greeting will change. We
decided we don’t want to have to update the test when the requirements
change, so instead of checking for exact equality to the value returned from
the greeting function, we’ll just assert that the output contains the text
of the input parameter.
*/
#[test]
fn greeting_contains_name() {
let result = greeting("Carol");
assert!(result.contains("Carol"),
"Greeting did not contain name, value was `{}`", result);
}
#[test]
#[should_panic(expected = "Guess value must be less than or equal to 100")]
fn greater_than_100() {
Guess::new(200);
}
/*
Writing tests so they return a Result<T, E> enables you to use the question
mark operator in the body of tests, which can be a convenient way to write
tests that should fail if any operation within them returns an Err variant.
You can’t use the #[should_panic] annotation on tests that use Result<T, E>.
Instead, you should return an Err value directly when the test should fail.
*/
#[test]
fn it_works() -> Result<(), String> {
if 2 + 2 == 4 {
Ok(())
} else {
Err(String::from("two plus two does not equal four"))
}
}
}
|
extern crate csv;
use std::collections::HashMap;
use std::collections::TreeMap;
use std::collections::HashSet;
use std::collections::hash_map::Occupied;
use std::collections::hash_map::Vacant;
fn main() {
println!(">> RECSYS welcome!");
let current_user_id = 20930;
let fp = &Path::new("./../data/blog-post-likes.csv");
let mut rdr = csv::Reader::from_file(fp);
let mut data: HashMap<uint, HashSet<uint>> = HashMap::new();
let mut need_ratings: HashSet<uint> = HashSet::new();
let mut predictions: TreeMap<uint, uint> = TreeMap::new();
let mut i = 0i;
for record in rdr.decode() {
let (post_id, user_id): (uint, uint) = record.unwrap();
match data.entry(post_id) {
Vacant(entry) => entry.set(HashSet::new()),
Occupied(entry) => entry.into_mut(),
}.insert(user_id);
if user_id != current_user_id {
need_ratings.insert(post_id);
}
i += 1;
if i > 10000 {
break;
}
}
for i in need_ratings.iter() {
let mut prediction = 0f32;
for j in data.keys() {
let set_a = data.get(i).unwrap();
let set_b = data.get(j).unwrap();
let f_a = set_a.len() as f32;
let f_b = set_b.len() as f32;
let f_both = set_a.intersection(set_b).count() as f32;
let s = f_both / (f_a * f_b);
prediction += s;
}
predictions.insert((prediction * 1000.0).round() as uint, *i);
}
let mut i = 0i;
println!("prediction, rating");
for (prediction, post_id) in predictions.rev_iter() {
println!("{}: {}", prediction, post_id);
i += 1;
if i > 10 {
break;
}
}
println!(">> DONE! Bey");
}
|
//! Commitment management
mod account;
mod blockhash;
pub use self::account::{AccountChange, AccountCommitment, AccountState, Storage};
pub use self::blockhash::BlockhashState;
|
//! Types and parsers for various [`SHOW`][sql] schema statements.
//!
//! [sql]: https://docs.influxdata.com/influxdb/v1.8/query_language/explore-schema/
use crate::common::ws1;
use crate::identifier::{identifier, Identifier};
use crate::impl_tuple_clause;
use crate::internal::{expect, ParseResult};
use crate::keywords::keyword;
use crate::show_field_keys::show_field_keys;
use crate::show_measurements::show_measurements;
use crate::show_retention_policies::show_retention_policies;
use crate::show_tag_keys::show_tag_keys;
use crate::show_tag_values::show_tag_values;
use crate::statement::Statement;
use nom::branch::alt;
use nom::combinator::{map, value};
use nom::sequence::{pair, preceded};
use std::fmt::{Display, Formatter};
/// Parse a SHOW statement.
pub(crate) fn show_statement(i: &str) -> ParseResult<&str, Statement> {
preceded(
pair(keyword("SHOW"), ws1),
expect(
"invalid SHOW statement, expected DATABASES, FIELD, MEASUREMENTS, TAG, or RETENTION following SHOW",
alt((
// SHOW DATABASES
map(show_databases, |s| Statement::ShowDatabases(Box::new(s))),
// SHOW FIELD KEYS
map(show_field_keys, |s| Statement::ShowFieldKeys(Box::new(s))),
// SHOW MEASUREMENTS
map(show_measurements, |s| {
Statement::ShowMeasurements(Box::new(s))
}),
// SHOW RETENTION POLICIES
map(show_retention_policies, |s| {
Statement::ShowRetentionPolicies(Box::new(s))
}),
// SHOW TAG
show_tag,
)),
),
)(i)
}
/// Represents a `SHOW DATABASES` statement.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ShowDatabasesStatement;
impl Display for ShowDatabasesStatement {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_str("SHOW DATABASES")
}
}
/// Parse a `SHOW DATABASES` statement.
fn show_databases(i: &str) -> ParseResult<&str, ShowDatabasesStatement> {
value(ShowDatabasesStatement, keyword("DATABASES"))(i)
}
/// Represents an `ON` clause for the case where the database is a single [`Identifier`].
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct OnClause(pub(crate) Identifier);
impl_tuple_clause!(OnClause, Identifier);
impl Display for OnClause {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
write!(f, "ON {}", self.0)
}
}
/// Parse an `ON` clause for statements such as `SHOW TAG KEYS` and `SHOW FIELD KEYS`.
pub(crate) fn on_clause(i: &str) -> ParseResult<&str, OnClause> {
preceded(
keyword("ON"),
expect(
"invalid ON clause, expected identifier",
map(identifier, OnClause),
),
)(i)
}
/// Parse a `SHOW TAG (KEYS|VALUES)` statement.
fn show_tag(i: &str) -> ParseResult<&str, Statement> {
preceded(
pair(keyword("TAG"), ws1),
expect(
"invalid SHOW TAG statement, expected KEYS or VALUES",
alt((
map(show_tag_keys, |s| Statement::ShowTagKeys(Box::new(s))),
map(show_tag_values, |s| Statement::ShowTagValues(Box::new(s))),
)),
),
)(i)
}
#[cfg(test)]
mod test {
use super::*;
use crate::assert_expect_error;
#[test]
fn test_show_statement() {
// Validate each of the `SHOW` statements are accepted
let (_, got) = show_statement("SHOW DATABASES").unwrap();
assert_eq!(got.to_string(), "SHOW DATABASES");
let (_, got) = show_statement("SHOW FIELD KEYS").unwrap();
assert_eq!(got.to_string(), "SHOW FIELD KEYS");
let (_, got) = show_statement("SHOW MEASUREMENTS").unwrap();
assert_eq!(got.to_string(), "SHOW MEASUREMENTS");
let (_, got) = show_statement("SHOW RETENTION POLICIES ON \"foo\"").unwrap();
assert_eq!(got.to_string(), "SHOW RETENTION POLICIES ON foo");
let (_, got) = show_statement("SHOW TAG KEYS").unwrap();
assert_eq!(got.to_string(), "SHOW TAG KEYS");
let (_, got) = show_statement("SHOW TAG VALUES WITH KEY = some_key").unwrap();
assert_eq!(got.to_string(), "SHOW TAG VALUES WITH KEY = some_key");
// Fallible cases
assert_expect_error!(
show_statement("SHOW TAG FOO WITH KEY = some_key"),
"invalid SHOW TAG statement, expected KEYS or VALUES"
);
// Unsupported SHOW
assert_expect_error!(
show_statement("SHOW FOO"),
"invalid SHOW statement, expected DATABASES, FIELD, MEASUREMENTS, TAG, or RETENTION following SHOW"
);
}
}
|
//! Handles the `/ipfs/bitswap/1.0.0` and `/ipfs/bitswap/1.1.0` protocols. This
//! allows exchanging IPFS blocks.
//!
//! # Usage
//!
//! The `Bitswap` struct implements the `NetworkBehaviour` trait. When used, it
//! will allow providing and reciving IPFS blocks.
use crate::block::Block;
use crate::ledger::{Ledger, Message, Priority};
use crate::protocol::{BitswapConfig, MessageWrapper};
use cid::Cid;
use fnv::FnvHashSet;
use futures::channel::mpsc::{unbounded, UnboundedReceiver, UnboundedSender};
use hash_hasher::HashedMap;
use libp2p_core::{connection::ConnectionId, ConnectedPoint, Multiaddr, PeerId};
use libp2p_swarm::dial_opts::{DialOpts, PeerCondition};
use libp2p_swarm::handler::OneShotHandler;
use libp2p_swarm::{NetworkBehaviour, NetworkBehaviourAction, NotifyHandler, PollParameters};
use std::task::{Context, Poll};
use std::{
collections::{HashMap, VecDeque},
mem,
sync::{
atomic::{AtomicU64, Ordering},
Arc,
},
};
/// Event used to communicate with the swarm or the higher level behaviour.
#[derive(Clone, Debug, Eq, PartialEq)]
pub enum BitswapEvent {
ReceivedBlock(PeerId, Block),
ReceivedWant(PeerId, Cid, Priority),
ReceivedCancel(PeerId, Cid),
}
/// Bitswap statistics.
#[derive(Debug, Default)]
pub struct Stats {
pub sent_blocks: AtomicU64,
pub sent_data: AtomicU64,
pub received_blocks: AtomicU64,
pub received_data: AtomicU64,
pub duplicate_blocks: AtomicU64,
pub duplicate_data: AtomicU64,
}
impl Stats {
pub fn update_outgoing(&self, num_blocks: u64) {
self.sent_blocks.fetch_add(num_blocks, Ordering::Relaxed);
}
pub fn update_incoming_unique(&self, bytes: u64) {
self.received_blocks.fetch_add(1, Ordering::Relaxed);
self.received_data.fetch_add(bytes, Ordering::Relaxed);
}
pub fn update_incoming_duplicate(&self, bytes: u64) {
self.duplicate_blocks.fetch_add(1, Ordering::Relaxed);
self.duplicate_data.fetch_add(bytes, Ordering::Relaxed);
}
pub fn add_assign(&self, other: &Stats) {
self.sent_blocks
.fetch_add(other.sent_blocks.load(Ordering::Relaxed), Ordering::Relaxed);
self.sent_data
.fetch_add(other.sent_data.load(Ordering::Relaxed), Ordering::Relaxed);
self.received_blocks.fetch_add(
other.received_blocks.load(Ordering::Relaxed),
Ordering::Relaxed,
);
self.received_data.fetch_add(
other.received_data.load(Ordering::Relaxed),
Ordering::Relaxed,
);
self.duplicate_blocks.fetch_add(
other.duplicate_blocks.load(Ordering::Relaxed),
Ordering::Relaxed,
);
self.duplicate_data.fetch_add(
other.duplicate_data.load(Ordering::Relaxed),
Ordering::Relaxed,
);
}
}
/// Network behaviour that handles sending and receiving IPFS blocks.
pub struct Bitswap {
/// Queue of events to report to the user.
events: VecDeque<
NetworkBehaviourAction<
BitswapEvent,
<Bitswap as NetworkBehaviour>::ConnectionHandler,
Message,
>,
>,
/// List of prospect peers to connect to.
target_peers: FnvHashSet<PeerId>,
/// Ledger
pub connected_peers: HashMap<PeerId, Ledger>,
/// Wanted blocks
wanted_blocks: HashedMap<Cid, Priority>,
/// Blocks queued to be sent
pub queued_blocks: UnboundedSender<(PeerId, Block)>,
ready_blocks: UnboundedReceiver<(PeerId, Block)>,
/// Statistics related to peers.
pub stats: HashMap<PeerId, Arc<Stats>>,
}
impl Default for Bitswap {
fn default() -> Self {
let (tx, rx) = unbounded();
Bitswap {
events: Default::default(),
target_peers: Default::default(),
connected_peers: Default::default(),
wanted_blocks: Default::default(),
queued_blocks: tx,
ready_blocks: rx,
stats: Default::default(),
}
}
}
impl Bitswap {
/// Return the wantlist of the local node
pub fn local_wantlist(&self) -> Vec<(Cid, Priority)> {
self.wanted_blocks
.iter()
.map(|(cid, prio)| (cid.clone(), *prio))
.collect()
}
/// Return the wantlist of a peer, if known
pub fn peer_wantlist(&self, peer: &PeerId) -> Option<Vec<(Cid, Priority)>> {
self.connected_peers.get(peer).map(Ledger::wantlist)
}
pub fn stats(&self) -> Stats {
self.stats
.values()
.fold(Stats::default(), |acc, peer_stats| {
acc.add_assign(peer_stats);
acc
})
}
pub fn peers(&self) -> Vec<PeerId> {
self.connected_peers.keys().cloned().collect()
}
/// Connect to peer.
///
/// Called from Kademlia behaviour.
pub fn connect(&mut self, peer_id: PeerId) {
if self.target_peers.insert(peer_id) {
let handler = self.new_handler();
self.events.push_back(NetworkBehaviourAction::Dial {
opts: DialOpts::peer_id(peer_id)
.condition(PeerCondition::Disconnected)
.build(),
handler,
});
}
}
/// Sends a block to the peer.
///
/// Called from a Strategy.
pub fn send_block(&mut self, peer_id: PeerId, block: Block) {
trace!("queueing block to be sent to {}: {}", peer_id, block.cid);
if let Some(ledger) = self.connected_peers.get_mut(&peer_id) {
ledger.add_block(block);
}
}
/// Sends the wantlist to the peer.
fn send_want_list(&mut self, peer_id: PeerId) {
if !self.wanted_blocks.is_empty() {
// FIXME: this can produce too long a message
// FIXME: we should shard these across all of our peers by some logic; also, peers may
// have been discovered to provide some specific wantlist item
let mut message = Message::default();
for (cid, priority) in &self.wanted_blocks {
message.want_block(cid, *priority);
}
self.events
.push_back(NetworkBehaviourAction::NotifyHandler {
peer_id,
event: message,
handler: NotifyHandler::Any,
});
}
}
/// Queues the wanted block for all peers.
///
/// A user request
pub fn want_block(&mut self, cid: Cid, priority: Priority) {
for (_peer_id, ledger) in self.connected_peers.iter_mut() {
ledger.want_block(&cid, priority);
}
self.wanted_blocks.insert(cid, priority);
}
/// Removes the block from our want list and updates all peers.
///
/// Can be either a user request or be called when the block
/// was received.
pub fn cancel_block(&mut self, cid: &Cid) {
for (_peer_id, ledger) in self.connected_peers.iter_mut() {
ledger.cancel_block(cid);
}
self.wanted_blocks.remove(cid);
}
}
impl NetworkBehaviour for Bitswap {
type ConnectionHandler = OneShotHandler<BitswapConfig, Message, MessageWrapper>;
type OutEvent = BitswapEvent;
fn new_handler(&mut self) -> Self::ConnectionHandler {
debug!("bitswap: new_handler");
Default::default()
}
fn addresses_of_peer(&mut self, _peer_id: &PeerId) -> Vec<Multiaddr> {
debug!("bitswap: addresses_of_peer");
Vec::new()
}
fn inject_connection_established(
&mut self,
peer_id: &PeerId,
_connection_id: &ConnectionId,
_endpoint: &ConnectedPoint,
_failed_addresses: Option<&Vec<Multiaddr>>,
_other_established: usize,
) {
debug!("bitswap: inject_connected {}", peer_id);
let ledger = Ledger::new();
self.stats.entry(*peer_id).or_default();
self.connected_peers.insert(*peer_id, ledger);
self.send_want_list(*peer_id);
}
fn inject_connection_closed(
&mut self,
peer_id: &PeerId,
_connection_id: &ConnectionId,
_endpoint: &ConnectedPoint,
_handler: Self::ConnectionHandler,
_remaining_established: usize,
) {
debug!("bitswap: inject_disconnected {:?}", peer_id);
self.connected_peers.remove(peer_id);
// the related stats are not dropped, so that they
// persist for peers regardless of disconnects
}
fn inject_event(&mut self, source: PeerId, _connection: ConnectionId, message: MessageWrapper) {
let mut message = match message {
// we just sent an outgoing bitswap message, nothing to do here
// FIXME: we could commit any pending stats accounting for this peer now
// that the message may have sent, if we'd do such accounting
MessageWrapper::Tx => return,
// we've received a bitswap message, process it
MessageWrapper::Rx(msg) => msg,
};
debug!("bitswap: inject_event from {}: {:?}", source, message);
let current_wantlist = self.local_wantlist();
let ledger = self
.connected_peers
.get_mut(&source)
.expect("Peer not in ledger?!");
// Process the incoming cancel list.
for cid in message.cancel() {
ledger.received_want_list.remove(cid);
let event = BitswapEvent::ReceivedCancel(source, cid.clone());
self.events
.push_back(NetworkBehaviourAction::GenerateEvent(event));
}
// Process the incoming wantlist.
for (cid, priority) in message
.want()
.iter()
.filter(|&(cid, _)| !current_wantlist.iter().map(|(c, _)| c).any(|c| c == cid))
{
ledger.received_want_list.insert(cid.to_owned(), *priority);
let event = BitswapEvent::ReceivedWant(source, cid.clone(), *priority);
self.events
.push_back(NetworkBehaviourAction::GenerateEvent(event));
}
// Process the incoming blocks.
for block in mem::take(&mut message.blocks) {
self.cancel_block(block.cid());
let event = BitswapEvent::ReceivedBlock(source, block);
self.events
.push_back(NetworkBehaviourAction::GenerateEvent(event));
}
}
#[allow(clippy::type_complexity)]
fn poll(
&mut self,
ctx: &mut Context,
_: &mut impl PollParameters,
) -> Poll<NetworkBehaviourAction<Self::OutEvent, Self::ConnectionHandler>> {
use futures::stream::StreamExt;
while let Poll::Ready(Some((peer_id, block))) = self.ready_blocks.poll_next_unpin(ctx) {
self.send_block(peer_id, block);
}
if let Some(event) = self.events.pop_front() {
return Poll::Ready(event);
}
for (peer_id, ledger) in &mut self.connected_peers {
if let Some(message) = ledger.send() {
if let Some(peer_stats) = self.stats.get_mut(peer_id) {
peer_stats.update_outgoing(message.blocks.len() as u64);
}
return Poll::Ready(NetworkBehaviourAction::NotifyHandler {
peer_id: *peer_id,
handler: NotifyHandler::Any,
event: message,
});
}
}
Poll::Pending
}
}
|
#![cfg_attr(not(feature = "std"), no_std)]
use band_bridge;
#[cfg(feature = "std")]
use borsh::BorshDeserialize;
use frame_support::{decl_error, decl_event, decl_module, decl_storage, dispatch};
use frame_system::{self as system};
use sp_std::prelude::*;
/// The pallet's configuration trait.
pub trait Trait: system::Trait + band_bridge::Trait {
// Add other types and constants required to configure this pallet.
/// The overarching event type.
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
}
// This pallet's storage items.
decl_storage! {
trait Store for Module<T: Trait> as SimplePriceDB {
BlockIDToPrice get(fn simple_map): map hasher(blake2_128_concat) T::BlockNumber => u64;
}
}
// The pallet's events
decl_event!(
pub enum Event<T>
where
AccountId = <T as system::Trait>::AccountId,
BlockNumber = <T as system::Trait>::BlockNumber,
{
SetPriceAtBlock(u64, BlockNumber),
DecodeFail(AccountId),
}
);
// The pallet's errors
decl_error! {
pub enum Error for Module<T: Trait> {
/// Value was None
BorshDecodeFail,
/// Value reached maximum and cannot be incremented further
StorageOverflow,
///
VerificationFail,
}
}
// Define struct Price
#[cfg(feature = "std")]
#[derive(BorshDeserialize)]
struct Price {
px: u64,
}
// The pallet's dispatchable functions.
decl_module! {
/// The module declaration.
pub struct Module<T: Trait> for enum Call where origin: T::Origin {
// Initializing errors
// this includes information about your errors in the node's metadata.
// it is needed only if you are using errors in your pallet
type Error = Error<T>;
// Initializing events
// this is needed only if you are using events in your pallet
fn deposit_event() = default;
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
pub fn set_price(_origin, proof_data: Vec<u8>) -> dispatch::DispatchResult {
// Call Bridge contract to verify proof
let res_opt = <band_bridge::Module<T>>::verify_proof(proof_data.clone());
match res_opt {
Some(res) => {
#[cfg(feature = "std")]
let price = Price::try_from_slice(&res).map_err(|_| Error::<T>::BorshDecodeFail)?;
// Call the `system` pallet to get the current block number
let current_block = <system::Module<T>>::block_number();
// Update key-value
#[cfg(feature = "std")]
<BlockIDToPrice<T>>::insert(
¤t_block,
&price.px
);
// Here we are raising the SetPriceAtBlock event
#[cfg(feature = "std")]
Self::deposit_event(RawEvent::SetPriceAtBlock(price.px, current_block));
Ok(())
},
None => Err(Error::<T>::VerificationFail)?,
}
}
}
}
|
fn problem1() -> u64 {
(1..1000)
.filter(|n| n % 3 == 0 || n % 5 == 0)
.fold(0, |acc, n| acc + n)
}
fn problem2() -> u64 {
let mut a = 1;
let mut b = 2;
let mut sum = 0;
while b < 4_000_000 {
if b % 2 == 0 {
sum += b;
}
let tmp = a;
a = b;
b = tmp + b;
}
sum
}
fn main() {
println!("Problem 1");
println!("{}", problem1());
println!("Problem 2");
println!("{}", problem2());
}
|
use std::io::{Read, Result as IOResult};
use nalgebra::Vector3;
use crate::lump_data::{LumpData, LumpType};
use crate::PrimitiveRead;
#[derive(Copy, Clone, Debug)]
pub struct Plane {
pub normal: Vector3<f32>,
pub dist: f32,
pub edge_type: i32
}
impl LumpData for Plane {
fn lump_type() -> LumpType {
LumpType::Planes
}
fn lump_type_hdr() -> Option<LumpType> {
None
}
fn element_size(_version: i32) -> usize {
20
}
fn read(reader: &mut dyn Read, _version: i32) -> IOResult<Self> {
let normal = Vector3::<f32>::new(reader.read_f32()?, reader.read_f32()?, reader.read_f32()?);
let dist = reader.read_f32()?;
let edge_type = reader.read_i32()?;
Ok(Self {
normal,
dist,
edge_type
})
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.