Struct aws_sdk_ec2::model::InstanceStateChange
source · #[non_exhaustive]pub struct InstanceStateChange { /* private fields */ }
Expand description
Describes an instance state change.
Implementations§
source§impl InstanceStateChange
impl InstanceStateChange
sourcepub fn current_state(&self) -> Option<&InstanceState>
pub fn current_state(&self) -> Option<&InstanceState>
The current state of the instance.
sourcepub fn instance_id(&self) -> Option<&str>
pub fn instance_id(&self) -> Option<&str>
The ID of the instance.
sourcepub fn previous_state(&self) -> Option<&InstanceState>
pub fn previous_state(&self) -> Option<&InstanceState>
The previous state of the instance.
source§impl InstanceStateChange
impl InstanceStateChange
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture InstanceStateChange
.
Examples found in repository?
src/xml_deser.rs (line 55903)
55899 55900 55901 55902 55903 55904 55905 55906 55907 55908 55909 55910 55911 55912 55913 55914 55915 55916 55917 55918 55919 55920 55921 55922 55923 55924 55925 55926 55927 55928 55929 55930 55931 55932 55933 55934 55935 55936 55937 55938 55939 55940 55941 55942 55943
pub fn deser_structure_crate_model_instance_state_change(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::InstanceStateChange, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2720 =
Some(
crate::xml_deser::deser_structure_crate_model_instance_state(&mut tag)
?
)
;
builder = builder.set_current_state(var_2720);
}
,
s if s.matches("instanceId") /* InstanceId com.amazonaws.ec2#InstanceStateChange$InstanceId */ => {
let var_2721 =
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_instance_id(var_2721);
}
,
s if s.matches("previousState") /* PreviousState com.amazonaws.ec2#InstanceStateChange$PreviousState */ => {
let var_2722 =
Some(
crate::xml_deser::deser_structure_crate_model_instance_state(&mut tag)
?
)
;
builder = builder.set_previous_state(var_2722);
}
,
_ => {}
}
}
Ok(builder.build())
}
Trait Implementations§
source§impl Clone for InstanceStateChange
impl Clone for InstanceStateChange
source§fn clone(&self) -> InstanceStateChange
fn clone(&self) -> InstanceStateChange
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