Struct aws_sdk_networkmanager::model::vpc_attachment::Builder
source · pub struct Builder { /* private fields */ }Expand description
A builder for VpcAttachment.
Implementations§
source§impl Builder
impl Builder
sourcepub fn attachment(self, input: Attachment) -> Self
pub fn attachment(self, input: Attachment) -> Self
Provides details about the VPC attachment.
sourcepub fn set_attachment(self, input: Option<Attachment>) -> Self
pub fn set_attachment(self, input: Option<Attachment>) -> Self
Provides details about the VPC attachment.
Examples found in repository?
src/json_deser.rs (lines 6266-6270)
6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305
pub(crate) fn deser_structure_crate_model_vpc_attachment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VpcAttachment>,
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::vpc_attachment::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() {
"Attachment" => {
builder = builder.set_attachment(
crate::json_deser::deser_structure_crate_model_attachment(
tokens,
)?,
);
}
"SubnetArns" => {
builder = builder.set_subnet_arns(
crate::json_deser::deser_list_com_amazonaws_networkmanager_subnet_arn_list(tokens)?
);
}
"Options" => {
builder = builder.set_options(
crate::json_deser::deser_structure_crate_model_vpc_options(
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 subnet_arns(self, input: impl Into<String>) -> Self
pub fn subnet_arns(self, input: impl Into<String>) -> Self
Appends an item to subnet_arns.
To override the contents of this collection use set_subnet_arns.
The subnet ARNs.
sourcepub fn set_subnet_arns(self, input: Option<Vec<String>>) -> Self
pub fn set_subnet_arns(self, input: Option<Vec<String>>) -> Self
The subnet ARNs.
Examples found in repository?
src/json_deser.rs (lines 6273-6275)
6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305
pub(crate) fn deser_structure_crate_model_vpc_attachment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VpcAttachment>,
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::vpc_attachment::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() {
"Attachment" => {
builder = builder.set_attachment(
crate::json_deser::deser_structure_crate_model_attachment(
tokens,
)?,
);
}
"SubnetArns" => {
builder = builder.set_subnet_arns(
crate::json_deser::deser_list_com_amazonaws_networkmanager_subnet_arn_list(tokens)?
);
}
"Options" => {
builder = builder.set_options(
crate::json_deser::deser_structure_crate_model_vpc_options(
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 options(self, input: VpcOptions) -> Self
pub fn options(self, input: VpcOptions) -> Self
Provides details about the VPC attachment.
sourcepub fn set_options(self, input: Option<VpcOptions>) -> Self
pub fn set_options(self, input: Option<VpcOptions>) -> Self
Provides details about the VPC attachment.
Examples found in repository?
src/json_deser.rs (lines 6278-6282)
6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305
pub(crate) fn deser_structure_crate_model_vpc_attachment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VpcAttachment>,
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::vpc_attachment::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() {
"Attachment" => {
builder = builder.set_attachment(
crate::json_deser::deser_structure_crate_model_attachment(
tokens,
)?,
);
}
"SubnetArns" => {
builder = builder.set_subnet_arns(
crate::json_deser::deser_list_com_amazonaws_networkmanager_subnet_arn_list(tokens)?
);
}
"Options" => {
builder = builder.set_options(
crate::json_deser::deser_structure_crate_model_vpc_options(
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) -> VpcAttachment
pub fn build(self) -> VpcAttachment
Consumes the builder and constructs a VpcAttachment.
Examples found in repository?
src/json_deser.rs (line 6297)
6241 6242 6243 6244 6245 6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 6275 6276 6277 6278 6279 6280 6281 6282 6283 6284 6285 6286 6287 6288 6289 6290 6291 6292 6293 6294 6295 6296 6297 6298 6299 6300 6301 6302 6303 6304 6305
pub(crate) fn deser_structure_crate_model_vpc_attachment<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::VpcAttachment>,
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::vpc_attachment::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() {
"Attachment" => {
builder = builder.set_attachment(
crate::json_deser::deser_structure_crate_model_attachment(
tokens,
)?,
);
}
"SubnetArns" => {
builder = builder.set_subnet_arns(
crate::json_deser::deser_list_com_amazonaws_networkmanager_subnet_arn_list(tokens)?
);
}
"Options" => {
builder = builder.set_options(
crate::json_deser::deser_structure_crate_model_vpc_options(
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",
),
),
}
}