pub struct Builder { /* private fields */ }
Expand description
A builder for NetworkPathComponentDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn address(self, input: impl Into<String>) -> Self
pub fn address(self, input: impl Into<String>) -> Self
Appends an item to address
.
To override the contents of this collection use set_address
.
The IP addresses of the destination.
sourcepub fn set_address(self, input: Option<Vec<String>>) -> Self
pub fn set_address(self, input: Option<Vec<String>>) -> Self
The IP addresses of the destination.
Examples found in repository?
src/json_deser.rs (lines 10090-10092)
10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120
pub(crate) fn deser_structure_crate_model_network_path_component_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::NetworkPathComponentDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::network_path_component_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Address" => {
builder = builder.set_address(
crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
);
}
"PortRanges" => {
builder = builder.set_port_ranges(
crate::json_deser::deser_list_com_amazonaws_securityhub_port_range_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn port_ranges(self, input: PortRange) -> Self
pub fn port_ranges(self, input: PortRange) -> Self
Appends an item to port_ranges
.
To override the contents of this collection use set_port_ranges
.
A list of port ranges for the destination.
sourcepub fn set_port_ranges(self, input: Option<Vec<PortRange>>) -> Self
pub fn set_port_ranges(self, input: Option<Vec<PortRange>>) -> Self
A list of port ranges for the destination.
Examples found in repository?
src/json_deser.rs (lines 10095-10097)
10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120
pub(crate) fn deser_structure_crate_model_network_path_component_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::NetworkPathComponentDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::network_path_component_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Address" => {
builder = builder.set_address(
crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
);
}
"PortRanges" => {
builder = builder.set_port_ranges(
crate::json_deser::deser_list_com_amazonaws_securityhub_port_range_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}
sourcepub fn build(self) -> NetworkPathComponentDetails
pub fn build(self) -> NetworkPathComponentDetails
Consumes the builder and constructs a NetworkPathComponentDetails
.
Examples found in repository?
src/json_deser.rs (line 10112)
10065 10066 10067 10068 10069 10070 10071 10072 10073 10074 10075 10076 10077 10078 10079 10080 10081 10082 10083 10084 10085 10086 10087 10088 10089 10090 10091 10092 10093 10094 10095 10096 10097 10098 10099 10100 10101 10102 10103 10104 10105 10106 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 10117 10118 10119 10120
pub(crate) fn deser_structure_crate_model_network_path_component_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::NetworkPathComponentDetails>,
aws_smithy_json::deserialize::error::DeserializeError,
>
where
I: Iterator<
Item = Result<
aws_smithy_json::deserialize::Token<'a>,
aws_smithy_json::deserialize::error::DeserializeError,
>,
>,
{
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
#[allow(unused_mut)]
let mut builder = crate::model::network_path_component_details::Builder::default();
loop {
match tokens.next().transpose()? {
Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
match key.to_unescaped()?.as_ref() {
"Address" => {
builder = builder.set_address(
crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
);
}
"PortRanges" => {
builder = builder.set_port_ranges(
crate::json_deser::deser_list_com_amazonaws_securityhub_port_range_list(tokens)?
);
}
_ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
}
}
other => {
return Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
"expected object key or end object, found: {:?}",
other
)),
)
}
}
}
Ok(Some(builder.build()))
}
_ => Err(
aws_smithy_json::deserialize::error::DeserializeError::custom(
"expected start object or null",
),
),
}
}