Struct aws_sdk_shield::model::subscription_limits::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for SubscriptionLimits
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn protection_limits(self, input: ProtectionLimits) -> Self
pub fn protection_limits(self, input: ProtectionLimits) -> Self
Limits settings on protections for your subscription.
sourcepub fn set_protection_limits(self, input: Option<ProtectionLimits>) -> Self
pub fn set_protection_limits(self, input: Option<ProtectionLimits>) -> Self
Limits settings on protections for your subscription.
Examples found in repository?
src/json_deser.rs (lines 2903-2905)
2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933
pub(crate) fn deser_structure_crate_model_subscription_limits<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SubscriptionLimits>,
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::subscription_limits::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() {
"ProtectionLimits" => {
builder = builder.set_protection_limits(
crate::json_deser::deser_structure_crate_model_protection_limits(tokens)?
);
}
"ProtectionGroupLimits" => {
builder = builder.set_protection_group_limits(
crate::json_deser::deser_structure_crate_model_protection_group_limits(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 protection_group_limits(self, input: ProtectionGroupLimits) -> Self
pub fn protection_group_limits(self, input: ProtectionGroupLimits) -> Self
Limits settings on protection groups for your subscription.
sourcepub fn set_protection_group_limits(
self,
input: Option<ProtectionGroupLimits>
) -> Self
pub fn set_protection_group_limits(
self,
input: Option<ProtectionGroupLimits>
) -> Self
Limits settings on protection groups for your subscription.
Examples found in repository?
src/json_deser.rs (lines 2908-2910)
2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933
pub(crate) fn deser_structure_crate_model_subscription_limits<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SubscriptionLimits>,
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::subscription_limits::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() {
"ProtectionLimits" => {
builder = builder.set_protection_limits(
crate::json_deser::deser_structure_crate_model_protection_limits(tokens)?
);
}
"ProtectionGroupLimits" => {
builder = builder.set_protection_group_limits(
crate::json_deser::deser_structure_crate_model_protection_group_limits(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) -> SubscriptionLimits
pub fn build(self) -> SubscriptionLimits
Consumes the builder and constructs a SubscriptionLimits
.
Examples found in repository?
src/json_deser.rs (line 2925)
2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933
pub(crate) fn deser_structure_crate_model_subscription_limits<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::SubscriptionLimits>,
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::subscription_limits::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() {
"ProtectionLimits" => {
builder = builder.set_protection_limits(
crate::json_deser::deser_structure_crate_model_protection_limits(tokens)?
);
}
"ProtectionGroupLimits" => {
builder = builder.set_protection_group_limits(
crate::json_deser::deser_structure_crate_model_protection_group_limits(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",
),
),
}
}