Skip to main content

aws_sdk_quicksight/types/error/
_unsupported_pricing_plan_exception.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>This error indicates that you are calling an embedding operation in Amazon Quick Sight without the required pricing plan on your Amazon Web Services account. Before you can use embedding for anonymous users, a Quick Suite administrator needs to add capacity pricing to Quick Sight. You can do this on the <b>Manage Quick Suite</b> page.</p>
4/// <p>After capacity pricing is added, you can use the <code> <a href="https://docs.aws.amazon.com/quicksight/latest/APIReference/API_GetDashboardEmbedUrl.html">GetDashboardEmbedUrl</a> </code> API operation with the <code>--identity-type ANONYMOUS</code> option.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct UnsupportedPricingPlanException {
8    #[allow(missing_docs)] // documentation missing in model
9    pub message: ::std::option::Option<::std::string::String>,
10    /// <p>The Amazon Web Services request ID for this request.</p>
11    pub request_id: ::std::option::Option<::std::string::String>,
12    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
13}
14impl UnsupportedPricingPlanException {
15    /// <p>The Amazon Web Services request ID for this request.</p>
16    pub fn request_id(&self) -> ::std::option::Option<&str> {
17        self.request_id.as_deref()
18    }
19}
20impl UnsupportedPricingPlanException {
21    /// Returns the error message.
22    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    /// Creates a new builder-style object to manufacture [`UnsupportedPricingPlanException`](crate::types::error::UnsupportedPricingPlanException).
51    pub fn builder() -> crate::types::error::builders::UnsupportedPricingPlanExceptionBuilder {
52        crate::types::error::builders::UnsupportedPricingPlanExceptionBuilder::default()
53    }
54}
55
56/// A builder for [`UnsupportedPricingPlanException`](crate::types::error::UnsupportedPricingPlanException).
57#[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)] // documentation missing in model
66    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)] // documentation missing in model
71    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)] // documentation missing in model
76    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
77        &self.message
78    }
79    /// <p>The Amazon Web Services request ID for this request.</p>
80    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    /// <p>The Amazon Web Services request ID for this request.</p>
85    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
86        self.request_id = input;
87        self
88    }
89    /// <p>The Amazon Web Services request ID for this request.</p>
90    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
91        &self.request_id
92    }
93    /// Sets error metadata
94    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
95        self.meta = Some(meta);
96        self
97    }
98
99    /// Sets error metadata
100    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    /// Consumes the builder and constructs a [`UnsupportedPricingPlanException`](crate::types::error::UnsupportedPricingPlanException).
105    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}