Struct aws_sdk_ec2::model::dhcp_options::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for DhcpOptions
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn dhcp_configurations(self, input: DhcpConfiguration) -> Self
pub fn dhcp_configurations(self, input: DhcpConfiguration) -> Self
Appends an item to dhcp_configurations
.
To override the contents of this collection use set_dhcp_configurations
.
One or more DHCP options in the set.
sourcepub fn set_dhcp_configurations(
self,
input: Option<Vec<DhcpConfiguration>>
) -> Self
pub fn set_dhcp_configurations(
self,
input: Option<Vec<DhcpConfiguration>>
) -> Self
One or more DHCP options in the set.
Examples found in repository?
src/xml_deser.rs (line 26813)
26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856
pub fn deser_structure_crate_model_dhcp_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_1071 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_1071);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_1072 =
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_dhcp_options_id(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_1073 =
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_1073);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_1074 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1074);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn dhcp_options_id(self, input: impl Into<String>) -> Self
pub fn dhcp_options_id(self, input: impl Into<String>) -> Self
The ID of the set of DHCP options.
sourcepub fn set_dhcp_options_id(self, input: Option<String>) -> Self
pub fn set_dhcp_options_id(self, input: Option<String>) -> Self
The ID of the set of DHCP options.
Examples found in repository?
src/xml_deser.rs (line 26826)
26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856
pub fn deser_structure_crate_model_dhcp_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_1071 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_1071);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_1072 =
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_dhcp_options_id(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_1073 =
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_1073);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_1074 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1074);
}
,
_ => {}
}
}
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 DHCP options set.
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 DHCP options set.
Examples found in repository?
src/xml_deser.rs (line 26839)
26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856
pub fn deser_structure_crate_model_dhcp_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_1071 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_1071);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_1072 =
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_dhcp_options_id(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_1073 =
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_1073);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_1074 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1074);
}
,
_ => {}
}
}
Ok(builder.build())
}
Appends an item to tags
.
To override the contents of this collection use set_tags
.
Any tags assigned to the DHCP options set.
Any tags assigned to the DHCP options set.
Examples found in repository?
src/xml_deser.rs (line 26849)
26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856
pub fn deser_structure_crate_model_dhcp_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_1071 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_1071);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_1072 =
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_dhcp_options_id(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_1073 =
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_1073);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_1074 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1074);
}
,
_ => {}
}
}
Ok(builder.build())
}
sourcepub fn build(self) -> DhcpOptions
pub fn build(self) -> DhcpOptions
Consumes the builder and constructs a DhcpOptions
.
Examples found in repository?
src/xml_deser.rs (line 26855)
26799 26800 26801 26802 26803 26804 26805 26806 26807 26808 26809 26810 26811 26812 26813 26814 26815 26816 26817 26818 26819 26820 26821 26822 26823 26824 26825 26826 26827 26828 26829 26830 26831 26832 26833 26834 26835 26836 26837 26838 26839 26840 26841 26842 26843 26844 26845 26846 26847 26848 26849 26850 26851 26852 26853 26854 26855 26856
pub fn deser_structure_crate_model_dhcp_options(
decoder: &mut aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::model::DhcpOptions, aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::model::DhcpOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("dhcpConfigurationSet") /* DhcpConfigurations com.amazonaws.ec2#DhcpOptions$DhcpConfigurations */ => {
let var_1071 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_dhcp_configuration_list(&mut tag)
?
)
;
builder = builder.set_dhcp_configurations(var_1071);
}
,
s if s.matches("dhcpOptionsId") /* DhcpOptionsId com.amazonaws.ec2#DhcpOptions$DhcpOptionsId */ => {
let var_1072 =
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_dhcp_options_id(var_1072);
}
,
s if s.matches("ownerId") /* OwnerId com.amazonaws.ec2#DhcpOptions$OwnerId */ => {
let var_1073 =
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_1073);
}
,
s if s.matches("tagSet") /* Tags com.amazonaws.ec2#DhcpOptions$Tags */ => {
let var_1074 =
Some(
crate::xml_deser::deser_list_com_amazonaws_ec2_tag_list(&mut tag)
?
)
;
builder = builder.set_tags(var_1074);
}
,
_ => {}
}
}
Ok(builder.build())
}