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