aws_sdk_neptune/types/error/
_authorization_not_found_fault.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Specified CIDRIP or EC2 security group is not authorized for the specified DB security group.</p>
4/// <p>Neptune may not also be authorized via IAM to perform necessary actions on your behalf.</p>
5#[non_exhaustive]
6#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
7pub struct AuthorizationNotFoundFault {
8    /// <p>A message describing the details of the problem.</p>
9    pub message: ::std::option::Option<::std::string::String>,
10    pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
11}
12impl AuthorizationNotFoundFault {
13    /// Returns the error message.
14    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    /// Creates a new builder-style object to manufacture [`AuthorizationNotFoundFault`](crate::types::error::AuthorizationNotFoundFault).
43    pub fn builder() -> crate::types::error::builders::AuthorizationNotFoundFaultBuilder {
44        crate::types::error::builders::AuthorizationNotFoundFaultBuilder::default()
45    }
46}
47
48/// A builder for [`AuthorizationNotFoundFault`](crate::types::error::AuthorizationNotFoundFault).
49#[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    /// <p>A message describing the details of the problem.</p>
57    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    /// <p>A message describing the details of the problem.</p>
62    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
63        self.message = input;
64        self
65    }
66    /// <p>A message describing the details of the problem.</p>
67    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
68        &self.message
69    }
70    /// Sets error metadata
71    pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
72        self.meta = Some(meta);
73        self
74    }
75
76    /// Sets error metadata
77    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    /// Consumes the builder and constructs a [`AuthorizationNotFoundFault`](crate::types::error::AuthorizationNotFoundFault).
82    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}