pub struct Builder { /* private fields */ }
Expand description
A builder for AwsApiGatewayMethodSettings
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn metrics_enabled(self, input: bool) -> Self
pub fn metrics_enabled(self, input: bool) -> Self
Indicates whether CloudWatch metrics are enabled for the method.
sourcepub fn set_metrics_enabled(self, input: Option<bool>) -> Self
pub fn set_metrics_enabled(self, input: Option<bool>) -> Self
Indicates whether CloudWatch metrics are enabled for the method.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 logging_level(self, input: impl Into<String>) -> Self
pub fn logging_level(self, input: impl Into<String>) -> Self
The logging level for this method. The logging level affects the log entries that are pushed to CloudWatch Logs.
If the logging level is ERROR
, then the logs only include error-level entries.
If the logging level is INFO
, then the logs include both ERROR
events and extra informational events.
Valid values: OFF
| ERROR
| INFO
sourcepub fn set_logging_level(self, input: Option<String>) -> Self
pub fn set_logging_level(self, input: Option<String>) -> Self
The logging level for this method. The logging level affects the log entries that are pushed to CloudWatch Logs.
If the logging level is ERROR
, then the logs only include error-level entries.
If the logging level is INFO
, then the logs include both ERROR
events and extra informational events.
Valid values: OFF
| ERROR
| INFO
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 data_trace_enabled(self, input: bool) -> Self
pub fn data_trace_enabled(self, input: bool) -> Self
Indicates whether data trace logging is enabled for the method. Data trace logging affects the log entries that are pushed to CloudWatch Logs.
sourcepub fn set_data_trace_enabled(self, input: Option<bool>) -> Self
pub fn set_data_trace_enabled(self, input: Option<bool>) -> Self
Indicates whether data trace logging is enabled for the method. Data trace logging affects the log entries that are pushed to CloudWatch Logs.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 throttling_burst_limit(self, input: i32) -> Self
pub fn throttling_burst_limit(self, input: i32) -> Self
The throttling burst limit for the method.
sourcepub fn set_throttling_burst_limit(self, input: Option<i32>) -> Self
pub fn set_throttling_burst_limit(self, input: Option<i32>) -> Self
The throttling burst limit for the method.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 throttling_rate_limit(self, input: f64) -> Self
pub fn throttling_rate_limit(self, input: f64) -> Self
The throttling rate limit for the method.
sourcepub fn set_throttling_rate_limit(self, input: Option<f64>) -> Self
pub fn set_throttling_rate_limit(self, input: Option<f64>) -> Self
The throttling rate limit for the method.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 caching_enabled(self, input: bool) -> Self
pub fn caching_enabled(self, input: bool) -> Self
Indicates whether responses are cached and returned for requests. For responses to be cached, a cache cluster must be enabled on the stage.
sourcepub fn set_caching_enabled(self, input: Option<bool>) -> Self
pub fn set_caching_enabled(self, input: Option<bool>) -> Self
Indicates whether responses are cached and returned for requests. For responses to be cached, a cache cluster must be enabled on the stage.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 cache_ttl_in_seconds(self, input: i32) -> Self
pub fn cache_ttl_in_seconds(self, input: i32) -> Self
Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response is cached.
sourcepub fn set_cache_ttl_in_seconds(self, input: Option<i32>) -> Self
pub fn set_cache_ttl_in_seconds(self, input: Option<i32>) -> Self
Specifies the time to live (TTL), in seconds, for cached responses. The higher the TTL, the longer the response is cached.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 cache_data_encrypted(self, input: bool) -> Self
pub fn cache_data_encrypted(self, input: bool) -> Self
Indicates whether the cached responses are encrypted.
sourcepub fn set_cache_data_encrypted(self, input: Option<bool>) -> Self
pub fn set_cache_data_encrypted(self, input: Option<bool>) -> Self
Indicates whether the cached responses are encrypted.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}
Indicates whether authorization is required for a cache invalidation request.
Indicates whether authorization is required for a cache invalidation request.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}
Indicates how to handle unauthorized requests for cache invalidation.
Valid values: FAIL_WITH_403
| SUCCEED_WITH_RESPONSE_HEADER
| SUCCEED_WITHOUT_RESPONSE_HEADER
Indicates how to handle unauthorized requests for cache invalidation.
Valid values: FAIL_WITH_403
| SUCCEED_WITH_RESPONSE_HEADER
| SUCCEED_WITHOUT_RESPONSE_HEADER
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 http_method(self, input: impl Into<String>) -> Self
pub fn http_method(self, input: impl Into<String>) -> Self
The HTTP method. You can use an asterisk (*) as a wildcard to apply method settings to multiple methods.
sourcepub fn set_http_method(self, input: Option<String>) -> Self
pub fn set_http_method(self, input: Option<String>) -> Self
The HTTP method. You can use an asterisk (*) as a wildcard to apply method settings to multiple methods.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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 resource_path(self, input: impl Into<String>) -> Self
pub fn resource_path(self, input: impl Into<String>) -> Self
The resource path for this method. Forward slashes (/) are encoded as ~1 . The initial slash must include a forward slash.
For example, the path value /resource/subresource
must be encoded as /~1resource~1subresource
.
To specify the root path, use only a slash (/). You can use an asterisk (*) as a wildcard to apply method settings to multiple methods.
sourcepub fn set_resource_path(self, input: Option<String>) -> Self
pub fn set_resource_path(self, input: Option<String>) -> Self
The resource path for this method. Forward slashes (/) are encoded as ~1 . The initial slash must include a forward slash.
For example, the path value /resource/subresource
must be encoded as /~1resource~1subresource
.
To specify the root path, use only a slash (/). You can use an asterisk (*) as a wildcard to apply method settings to multiple methods.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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) -> AwsApiGatewayMethodSettings
pub fn build(self) -> AwsApiGatewayMethodSettings
Consumes the builder and constructs a AwsApiGatewayMethodSettings
.
Examples found in repository?
35875 35876 35877 35878 35879 35880 35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 35897 35898 35899 35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 35917 35918 35919 35920 35921 35922 35923 35924 35925 35926 35927 35928 35929 35930 35931 35932 35933 35934 35935 35936 35937 35938 35939 35940 35941 35942 35943 35944 35945 35946 35947 35948 35949 35950 35951 35952 35953 35954 35955 35956 35957 35958 35959 35960 35961 35962 35963 35964 35965 35966 35967 35968 35969 35970 35971 35972 35973 35974 35975 35976 35977 35978 35979 35980 35981 35982 35983 35984 35985 35986 35987 35988 35989 35990 35991 35992 35993 35994 35995 35996 35997 35998 35999 36000 36001 36002 36003 36004 36005 36006 36007 36008 36009 36010 36011 36012 36013 36014 36015 36016 36017
pub(crate) fn deser_structure_crate_model_aws_api_gateway_method_settings<'a, I>(
tokens: &mut std::iter::Peekable<I>,
) -> Result<
Option<crate::model::AwsApiGatewayMethodSettings>,
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::aws_api_gateway_method_settings::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() {
"MetricsEnabled" => {
builder = builder.set_metrics_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"LoggingLevel" => {
builder = builder.set_logging_level(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"DataTraceEnabled" => {
builder = builder.set_data_trace_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"ThrottlingBurstLimit" => {
builder = builder.set_throttling_burst_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"ThrottlingRateLimit" => {
builder = builder.set_throttling_rate_limit(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(|v| v.to_f64_lossy()),
);
}
"CachingEnabled" => {
builder = builder.set_caching_enabled(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"CacheTtlInSeconds" => {
builder = builder.set_cache_ttl_in_seconds(
aws_smithy_json::deserialize::token::expect_number_or_null(
tokens.next(),
)?
.map(i32::try_from)
.transpose()?,
);
}
"CacheDataEncrypted" => {
builder = builder.set_cache_data_encrypted(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"RequireAuthorizationForCacheControl" => {
builder = builder.set_require_authorization_for_cache_control(
aws_smithy_json::deserialize::token::expect_bool_or_null(
tokens.next(),
)?,
);
}
"UnauthorizedCacheControlHeaderStrategy" => {
builder = builder.set_unauthorized_cache_control_header_strategy(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"HttpMethod" => {
builder = builder.set_http_method(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
"ResourcePath" => {
builder = builder.set_resource_path(
aws_smithy_json::deserialize::token::expect_string_or_null(
tokens.next(),
)?
.map(|s| s.to_unescaped().map(|u| u.into_owned()))
.transpose()?,
);
}
_ => 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",
),
),
}
}