pub struct Builder { /* private fields */ }
Expand description
A builder for ActionRemoteIpDetails
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn ip_address_v4(self, input: impl Into<String>) -> Self
pub fn ip_address_v4(self, input: impl Into<String>) -> Self
The IP address.
sourcepub fn set_ip_address_v4(self, input: Option<String>) -> Self
pub fn set_ip_address_v4(self, input: Option<String>) -> Self
The IP address.
Examples found in repository?
src/json_deser.rs (lines 9339-9345)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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 organization(self, input: IpOrganizationDetails) -> Self
pub fn organization(self, input: IpOrganizationDetails) -> Self
The internet service provider (ISP) organization associated with the remote IP address.
sourcepub fn set_organization(self, input: Option<IpOrganizationDetails>) -> Self
pub fn set_organization(self, input: Option<IpOrganizationDetails>) -> Self
The internet service provider (ISP) organization associated with the remote IP address.
Examples found in repository?
src/json_deser.rs (lines 9348-9350)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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 country(self, input: Country) -> Self
pub fn country(self, input: Country) -> Self
The country where the remote IP address is located.
sourcepub fn set_country(self, input: Option<Country>) -> Self
pub fn set_country(self, input: Option<Country>) -> Self
The country where the remote IP address is located.
Examples found in repository?
src/json_deser.rs (lines 9353-9355)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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 set_city(self, input: Option<City>) -> Self
pub fn set_city(self, input: Option<City>) -> Self
The city where the remote IP address is located.
Examples found in repository?
src/json_deser.rs (lines 9358-9360)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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 geo_location(self, input: GeoLocation) -> Self
pub fn geo_location(self, input: GeoLocation) -> Self
The coordinates of the location of the remote IP address.
sourcepub fn set_geo_location(self, input: Option<GeoLocation>) -> Self
pub fn set_geo_location(self, input: Option<GeoLocation>) -> Self
The coordinates of the location of the remote IP address.
Examples found in repository?
src/json_deser.rs (lines 9363-9367)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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) -> ActionRemoteIpDetails
pub fn build(self) -> ActionRemoteIpDetails
Consumes the builder and constructs a ActionRemoteIpDetails
.
Examples found in repository?
src/json_deser.rs (line 9382)
9314 9315 9316 9317 9318 9319 9320 9321 9322 9323 9324 9325 9326 9327 9328 9329 9330 9331 9332 9333 9334 9335 9336 9337 9338 9339 9340 9341 9342 9343 9344 9345 9346 9347 9348 9349 9350 9351 9352 9353 9354 9355 9356 9357 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390
pub(crate) fn deser_structure_crate_model_action_remote_ip_details<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::ActionRemoteIpDetails>,
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::action_remote_ip_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() {
"IpAddressV4" => {
builder = builder.set_ip_address_v4(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"Organization" => {
builder = builder.set_organization(
crate::json_deser::deser_structure_crate_model_ip_organization_details(tokens)?
);
}
"Country" => {
builder = builder.set_country(
crate::json_deser::deser_structure_crate_model_country(tokens)?,
);
}
"City" => {
builder = builder.set_city(
crate::json_deser::deser_structure_crate_model_city(tokens)?,
);
}
"GeoLocation" => {
builder = builder.set_geo_location(
crate::json_deser::deser_structure_crate_model_geo_location(
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",
),
),
}
}