Struct aws_sdk_ec2::model::reservation::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for Reservation
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn groups(self, input: GroupIdentifier) -> Self
pub fn groups(self, input: GroupIdentifier) -> Self
Appends an item to groups
.
To override the contents of this collection use set_groups
.
[EC2-Classic only] The security groups.
sourcepub fn set_groups(self, input: Option<Vec<GroupIdentifier>>) -> Self
pub fn set_groups(self, input: Option<Vec<GroupIdentifier>>) -> Self
[EC2-Classic only] The security groups.
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn instances(self, input: Instance) -> Self
pub fn instances(self, input: Instance) -> Self
Appends an item to instances
.
To override the contents of this collection use set_instances
.
The instances.
sourcepub fn set_instances(self, input: Option<Vec<Instance>>) -> Self
pub fn set_instances(self, input: Option<Vec<Instance>>) -> Self
The instances.
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn owner_id(self, input: impl Into<String>) -> Self
pub fn owner_id(self, input: impl Into<String>) -> Self
The ID of the Amazon Web Services account that owns the reservation.
sourcepub fn set_owner_id(self, input: Option<String>) -> Self
pub fn set_owner_id(self, input: Option<String>) -> Self
The ID of the Amazon Web Services account that owns the reservation.
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn requester_id(self, input: impl Into<String>) -> Self
pub fn requester_id(self, input: impl Into<String>) -> Self
The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).
sourcepub fn set_requester_id(self, input: Option<String>) -> Self
pub fn set_requester_id(self, input: Option<String>) -> Self
The ID of the requester that launched the instances on your behalf (for example, Amazon Web Services Management Console or Auto Scaling).
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn reservation_id(self, input: impl Into<String>) -> Self
pub fn reservation_id(self, input: impl Into<String>) -> Self
The ID of the reservation.
sourcepub fn set_reservation_id(self, input: Option<String>) -> Self
pub fn set_reservation_id(self, input: Option<String>) -> Self
The ID of the reservation.
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> Reservation
pub fn build(self) -> Reservation
Consumes the builder and constructs a Reservation
.
Examples found in repository?
47065 47066 47067 47068 47069 47070 47071 47072 47073 47074 47075 47076 47077 47078 47079 47080 47081 47082 47083 47084 47085 47086 47087 47088 47089 47090 47091 47092 47093 47094 47095 47096 47097 47098 47099 47100 47101 47102 47103 47104 47105 47106 47107 47108 47109 47110 47111 47112 47113 47114 47115 47116 47117 47118 47119 47120 47121 47122 47123 47124 47125 47126 47127 47128 47129 47130 47131 47132 47133 47134 47135
pub fn deser_structure_crate_model_reservation(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::Reservation, aws_smithy_xml::decode::XmlDecodeError> {
#[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_2136 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_group_identifier_list(&mut tag)
?
)
;
builder = builder.set_groups(var_2136);
}
,
s if s.matches("instancesSet") /* Instances com.amazonaws.ec2#Reservation$Instances */ => {
let var_2137 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_instance_list(&mut tag)
?
)
;
builder = builder.set_instances(var_2137);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#Reservation$OwnerId */ => {
let var_2138 =
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_owner_id(var_2138);
}
,
s if s.matches("requesterId") /* RequesterId com.amazonaws.ec2#Reservation$RequesterId */ => {
let var_2139 =
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_requester_id(var_2139);
}
,
s if s.matches("reservationId") /* ReservationId com.amazonaws.ec2#Reservation$ReservationId */ => {
let var_2140 =
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_reservation_id(var_2140);
}
,
_ => {}
}
}
Ok(builder.build())
}