Struct aws_sdk_ec2::model::ProductCode
source · #[non_exhaustive]pub struct ProductCode { /* private fields */ }
Expand description
Describes a product code.
Implementations§
source§impl ProductCode
impl ProductCode
sourcepub fn product_code_id(&self) -> Option<&str>
pub fn product_code_id(&self) -> Option<&str>
The product code.
sourcepub fn product_code_type(&self) -> Option<&ProductCodeValues>
pub fn product_code_type(&self) -> Option<&ProductCodeValues>
The type of product code.
source§impl ProductCode
impl ProductCode
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture ProductCode
.
Examples found in repository?
src/xml_deser.rs (line 46223)
46219 46220 46221 46222 46223 46224 46225 46226 46227 46228 46229 46230 46231 46232 46233 46234 46235 46236 46237 46238 46239 46240 46241 46242 46243 46244 46245 46246 46247 46248 46249 46250 46251 46252 46253 46254 46255 46256 46257
pub fn deser_structure_crate_model_product_code(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::ProductCode, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2077 =
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_product_code_id(var_2077);
}
,
s if s.matches("type") /* ProductCodeType com.amazonaws.ec2#ProductCode$ProductCodeType */ => {
let var_2078 =
Some(
Result::<crate::model::ProductCodeValues, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::ProductCodeValues::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_product_code_type(var_2078);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for ProductCode
impl Clone for ProductCode
source§fn clone(&self) -> ProductCode
fn clone(&self) -> ProductCode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more