Struct aws_sdk_ec2::model::InstanceTypeOffering
source · #[non_exhaustive]pub struct InstanceTypeOffering { /* private fields */ }
Expand description
The instance types offered.
Implementations§
source§impl InstanceTypeOffering
impl InstanceTypeOffering
sourcepub fn instance_type(&self) -> Option<&InstanceType>
pub fn instance_type(&self) -> Option<&InstanceType>
The instance type. For more information, see Instance types in the Amazon EC2 User Guide.
sourcepub fn location_type(&self) -> Option<&LocationType>
pub fn location_type(&self) -> Option<&LocationType>
The location type.
source§impl InstanceTypeOffering
impl InstanceTypeOffering
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceTypeOffering
.
Examples found in repository?
src/xml_deser.rs (line 47233)
47229 47230 47231 47232 47233 47234 47235 47236 47237 47238 47239 47240 47241 47242 47243 47244 47245 47246 47247 47248 47249 47250 47251 47252 47253 47254 47255 47256 47257 47258 47259 47260 47261 47262 47263 47264 47265 47266 47267 47268 47269 47270 47271 47272 47273 47274 47275 47276 47277 47278 47279 47280 47281
pub fn deser_structure_crate_model_instance_type_offering(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceTypeOffering, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2148 =
Some(
Result::<crate::model::InstanceType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::InstanceType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_instance_type(var_2148);
}
,
s if s.matches("locationType") /* LocationType com.amazonaws.ec2#InstanceTypeOffering$LocationType */ => {
let var_2149 =
Some(
Result::<crate::model::LocationType, aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::model::LocationType::from(
aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_location_type(var_2149);
}
,
s if s.matches("location") /* Location com.amazonaws.ec2#InstanceTypeOffering$Location */ => {
let var_2150 =
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_location(var_2150);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceTypeOffering
impl Clone for InstanceTypeOffering
source§fn clone(&self) -> InstanceTypeOffering
fn clone(&self) -> InstanceTypeOffering
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