aws_sdk_dynamodbstreams/types/error/
_trimmed_data_access_exception.rs1#[non_exhaustive]
12#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
13pub struct TrimmedDataAccessException {
14 pub message: ::std::option::Option<::std::string::String>,
16 pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
17}
18impl TrimmedDataAccessException {
19 pub fn message(&self) -> ::std::option::Option<&str> {
21 self.message.as_deref()
22 }
23}
24impl ::std::fmt::Display for TrimmedDataAccessException {
25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26 ::std::write!(f, "TrimmedDataAccessException")?;
27 if let ::std::option::Option::Some(inner_1) = &self.message {
28 {
29 ::std::write!(f, ": {}", inner_1)?;
30 }
31 }
32 Ok(())
33 }
34}
35impl ::std::error::Error for TrimmedDataAccessException {}
36impl ::aws_types::request_id::RequestId for crate::types::error::TrimmedDataAccessException {
37 fn request_id(&self) -> Option<&str> {
38 use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
39 self.meta().request_id()
40 }
41}
42impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for TrimmedDataAccessException {
43 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
44 &self.meta
45 }
46}
47impl TrimmedDataAccessException {
48 pub fn builder() -> crate::types::error::builders::TrimmedDataAccessExceptionBuilder {
50 crate::types::error::builders::TrimmedDataAccessExceptionBuilder::default()
51 }
52}
53
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct TrimmedDataAccessExceptionBuilder {
58 pub(crate) message: ::std::option::Option<::std::string::String>,
59 meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
60}
61impl TrimmedDataAccessExceptionBuilder {
62 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
64 self.message = ::std::option::Option::Some(input.into());
65 self
66 }
67 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
69 self.message = input;
70 self
71 }
72 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
74 &self.message
75 }
76 pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
78 self.meta = Some(meta);
79 self
80 }
81
82 pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
84 self.meta = meta;
85 self
86 }
87 pub fn build(self) -> crate::types::error::TrimmedDataAccessException {
89 crate::types::error::TrimmedDataAccessException {
90 message: self.message,
91 meta: self.meta.unwrap_or_default(),
92 }
93 }
94}