aws_sdk_sts/types/error/
_idp_communication_error_exception.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct IdpCommunicationErrorException {
7 #[allow(missing_docs)] pub message: ::std::option::Option<::std::string::String>,
9 pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
10}
11impl IdpCommunicationErrorException {
12 pub fn retryable_error_kind(&self) -> ::aws_smithy_types::retry::ErrorKind {
14 ::aws_smithy_types::retry::ErrorKind::ServerError
15 }
16 pub fn message(&self) -> ::std::option::Option<&str> {
18 self.message.as_deref()
19 }
20}
21impl ::std::fmt::Display for IdpCommunicationErrorException {
22 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23 ::std::write!(f, "IdpCommunicationErrorException [IDPCommunicationErrorException]")?;
24 if let ::std::option::Option::Some(inner_1) = &self.message {
25 {
26 ::std::write!(f, ": {}", inner_1)?;
27 }
28 }
29 Ok(())
30 }
31}
32impl ::std::error::Error for IdpCommunicationErrorException {}
33impl ::aws_types::request_id::RequestId for crate::types::error::IdpCommunicationErrorException {
34 fn request_id(&self) -> Option<&str> {
35 use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
36 self.meta().request_id()
37 }
38}
39impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for IdpCommunicationErrorException {
40 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
41 &self.meta
42 }
43}
44impl IdpCommunicationErrorException {
45 pub fn builder() -> crate::types::error::builders::IdpCommunicationErrorExceptionBuilder {
47 crate::types::error::builders::IdpCommunicationErrorExceptionBuilder::default()
48 }
49}
50
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
53#[non_exhaustive]
54pub struct IdpCommunicationErrorExceptionBuilder {
55 pub(crate) message: ::std::option::Option<::std::string::String>,
56 meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
57}
58impl IdpCommunicationErrorExceptionBuilder {
59 #[allow(missing_docs)] pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.message = ::std::option::Option::Some(input.into());
62 self
63 }
64 #[allow(missing_docs)] pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.message = input;
67 self
68 }
69 #[allow(missing_docs)] pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
71 &self.message
72 }
73 pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
75 self.meta = Some(meta);
76 self
77 }
78
79 pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
81 self.meta = meta;
82 self
83 }
84 pub fn build(self) -> crate::types::error::IdpCommunicationErrorException {
86 crate::types::error::IdpCommunicationErrorException {
87 message: self.message,
88 meta: self.meta.unwrap_or_default(),
89 }
90 }
91}