#[allow(unused_mut)]
pub fn ser_parameter(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::Parameter,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("ParameterName");
if let Some(var_2) = &input.parameter_name {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("ParameterValue");
if let Some(var_4) = &input.parameter_value {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("Description");
if let Some(var_6) = &input.description {
scope_5.string(var_6);
}
#[allow(unused_mut)]
let mut scope_7 = writer.prefix("Source");
if let Some(var_8) = &input.source {
scope_7.string(var_8);
}
#[allow(unused_mut)]
let mut scope_9 = writer.prefix("DataType");
if let Some(var_10) = &input.data_type {
scope_9.string(var_10);
}
#[allow(unused_mut)]
let mut scope_11 = writer.prefix("AllowedValues");
if let Some(var_12) = &input.allowed_values {
scope_11.string(var_12);
}
#[allow(unused_mut)]
let mut scope_13 = writer.prefix("ApplyType");
if let Some(var_14) = &input.apply_type {
scope_13.string(var_14.as_str());
}
#[allow(unused_mut)]
let mut scope_15 = writer.prefix("IsModifiable");
if let Some(var_16) = &input.is_modifiable {
scope_15.boolean(*var_16);
}
#[allow(unused_mut)]
let mut scope_17 = writer.prefix("MinimumEngineVersion");
if let Some(var_18) = &input.minimum_engine_version {
scope_17.string(var_18);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_parameter(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::Parameter, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::Parameter::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ParameterName") => {
let var_19 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_parameter_name(var_19);
}
,
s if s.matches("ParameterValue") => {
let var_20 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_parameter_value(var_20);
}
,
s if s.matches("Description") => {
let var_21 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_description(var_21);
}
,
s if s.matches("Source") => {
let var_22 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_source(var_22);
}
,
s if s.matches("DataType") => {
let var_23 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_data_type(var_23);
}
,
s if s.matches("AllowedValues") => {
let var_24 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_allowed_values(var_24);
}
,
s if s.matches("ApplyType") => {
let var_25 =
Some(
Result::<crate::types::ParameterApplyType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::ParameterApplyType::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_apply_type(var_25);
}
,
s if s.matches("IsModifiable") => {
let var_26 =
Some(
{
<bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.redshift#Boolean`)"))
}
?
)
;
builder = builder.set_is_modifiable(var_26);
}
,
s if s.matches("MinimumEngineVersion") => {
let var_27 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_minimum_engine_version(var_27);
}
,
_ => {}
}
}
Ok(builder.build())
}