Struct aws_sdk_wafv2::types::builders::CustomResponseBodyBuilder
source · #[non_exhaustive]pub struct CustomResponseBodyBuilder { /* private fields */ }
Expand description
A builder for CustomResponseBody
.
Implementations§
source§impl CustomResponseBodyBuilder
impl CustomResponseBodyBuilder
sourcepub fn content_type(self, input: ResponseContentType) -> Self
pub fn content_type(self, input: ResponseContentType) -> Self
The type of content in the payload that you are defining in the Content
string.
sourcepub fn set_content_type(self, input: Option<ResponseContentType>) -> Self
pub fn set_content_type(self, input: Option<ResponseContentType>) -> Self
The type of content in the payload that you are defining in the Content
string.
sourcepub fn get_content_type(&self) -> &Option<ResponseContentType>
pub fn get_content_type(&self) -> &Option<ResponseContentType>
The type of content in the payload that you are defining in the Content
string.
sourcepub fn content(self, input: impl Into<String>) -> Self
pub fn content(self, input: impl Into<String>) -> Self
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType
setting.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
This field is required.sourcepub fn set_content(self, input: Option<String>) -> Self
pub fn set_content(self, input: Option<String>) -> Self
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType
setting.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
sourcepub fn get_content(&self) -> &Option<String>
pub fn get_content(&self) -> &Option<String>
The payload of the custom response.
You can use JSON escape strings in JSON content. To do this, you must specify JSON content in the ContentType
setting.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
sourcepub fn build(self) -> Result<CustomResponseBody, BuildError>
pub fn build(self) -> Result<CustomResponseBody, BuildError>
Consumes the builder and constructs a CustomResponseBody
.
This method will fail if any of the following fields are not set:
Trait Implementations§
source§impl Clone for CustomResponseBodyBuilder
impl Clone for CustomResponseBodyBuilder
source§fn clone(&self) -> CustomResponseBodyBuilder
fn clone(&self) -> CustomResponseBodyBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CustomResponseBodyBuilder
impl Debug for CustomResponseBodyBuilder
source§impl Default for CustomResponseBodyBuilder
impl Default for CustomResponseBodyBuilder
source§fn default() -> CustomResponseBodyBuilder
fn default() -> CustomResponseBodyBuilder
source§impl PartialEq for CustomResponseBodyBuilder
impl PartialEq for CustomResponseBodyBuilder
source§fn eq(&self, other: &CustomResponseBodyBuilder) -> bool
fn eq(&self, other: &CustomResponseBodyBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CustomResponseBodyBuilder
Auto Trait Implementations§
impl Freeze for CustomResponseBodyBuilder
impl RefUnwindSafe for CustomResponseBodyBuilder
impl Send for CustomResponseBodyBuilder
impl Sync for CustomResponseBodyBuilder
impl Unpin for CustomResponseBodyBuilder
impl UnwindSafe for CustomResponseBodyBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more