aws_sdk_quicksight/types/error/
_unsupported_pricing_plan_exception.rs1#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct UnsupportedPricingPlanException {
8 #[allow(missing_docs)] pub message: ::std::option::Option<::std::string::String>,
10 pub request_id: ::std::option::Option<::std::string::String>,
12 pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
13}
14impl UnsupportedPricingPlanException {
15 pub fn request_id(&self) -> ::std::option::Option<&str> {
17 self.request_id.as_deref()
18 }
19}
20impl UnsupportedPricingPlanException {
21 pub fn message(&self) -> ::std::option::Option<&str> {
23 self.message.as_deref()
24 }
25}
26impl ::std::fmt::Display for UnsupportedPricingPlanException {
27 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
28 ::std::write!(f, "UnsupportedPricingPlanException")?;
29 if let ::std::option::Option::Some(inner_1) = &self.message {
30 {
31 ::std::write!(f, ": {inner_1}")?;
32 }
33 }
34 Ok(())
35 }
36}
37impl ::std::error::Error for UnsupportedPricingPlanException {}
38impl ::aws_types::request_id::RequestId for crate::types::error::UnsupportedPricingPlanException {
39 fn request_id(&self) -> Option<&str> {
40 use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
41 self.meta().request_id()
42 }
43}
44impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for UnsupportedPricingPlanException {
45 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
46 &self.meta
47 }
48}
49impl UnsupportedPricingPlanException {
50 pub fn builder() -> crate::types::error::builders::UnsupportedPricingPlanExceptionBuilder {
52 crate::types::error::builders::UnsupportedPricingPlanExceptionBuilder::default()
53 }
54}
55
56#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct UnsupportedPricingPlanExceptionBuilder {
60 pub(crate) message: ::std::option::Option<::std::string::String>,
61 pub(crate) request_id: ::std::option::Option<::std::string::String>,
62 meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
63}
64impl UnsupportedPricingPlanExceptionBuilder {
65 #[allow(missing_docs)] pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67 self.message = ::std::option::Option::Some(input.into());
68 self
69 }
70 #[allow(missing_docs)] pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.message = input;
73 self
74 }
75 #[allow(missing_docs)] pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
77 &self.message
78 }
79 pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
81 self.request_id = ::std::option::Option::Some(input.into());
82 self
83 }
84 pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86 self.request_id = input;
87 self
88 }
89 pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
91 &self.request_id
92 }
93 pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
95 self.meta = Some(meta);
96 self
97 }
98
99 pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
101 self.meta = meta;
102 self
103 }
104 pub fn build(self) -> crate::types::error::UnsupportedPricingPlanException {
106 crate::types::error::UnsupportedPricingPlanException {
107 message: self.message,
108 request_id: self.request_id,
109 meta: self.meta.unwrap_or_default(),
110 }
111 }
112}