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