aws_sdk_iot1clickdevices/types/error/
_range_not_satisfiable_exception.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct RangeNotSatisfiableException {
6 pub code: ::std::option::Option<::std::string::String>,
8 pub message: ::std::option::Option<::std::string::String>,
10 pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
11}
12impl RangeNotSatisfiableException {
13 pub fn code(&self) -> ::std::option::Option<&str> {
15 self.code.as_deref()
16 }
17}
18impl RangeNotSatisfiableException {
19 pub fn message(&self) -> ::std::option::Option<&str> {
21 self.message.as_deref()
22 }
23}
24impl ::std::fmt::Display for RangeNotSatisfiableException {
25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26 ::std::write!(f, "RangeNotSatisfiableException")?;
27 if let ::std::option::Option::Some(inner_1) = &self.message {
28 {
29 ::std::write!(f, ": {}", inner_1)?;
30 }
31 }
32 Ok(())
33 }
34}
35impl ::std::error::Error for RangeNotSatisfiableException {}
36impl ::aws_types::request_id::RequestId for crate::types::error::RangeNotSatisfiableException {
37 fn request_id(&self) -> Option<&str> {
38 use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
39 self.meta().request_id()
40 }
41}
42impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for RangeNotSatisfiableException {
43 fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
44 &self.meta
45 }
46}
47impl RangeNotSatisfiableException {
48 pub fn builder() -> crate::types::error::builders::RangeNotSatisfiableExceptionBuilder {
50 crate::types::error::builders::RangeNotSatisfiableExceptionBuilder::default()
51 }
52}
53
54#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct RangeNotSatisfiableExceptionBuilder {
58 pub(crate) code: ::std::option::Option<::std::string::String>,
59 pub(crate) message: ::std::option::Option<::std::string::String>,
60 meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
61}
62impl RangeNotSatisfiableExceptionBuilder {
63 pub fn code(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.code = ::std::option::Option::Some(input.into());
66 self
67 }
68 pub fn set_code(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.code = input;
71 self
72 }
73 pub fn get_code(&self) -> &::std::option::Option<::std::string::String> {
75 &self.code
76 }
77 pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
79 self.message = ::std::option::Option::Some(input.into());
80 self
81 }
82 pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
84 self.message = input;
85 self
86 }
87 pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
89 &self.message
90 }
91 pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
93 self.meta = Some(meta);
94 self
95 }
96
97 pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
99 self.meta = meta;
100 self
101 }
102 pub fn build(self) -> crate::types::error::RangeNotSatisfiableException {
104 crate::types::error::RangeNotSatisfiableException {
105 code: self.code,
106 message: self.message,
107 meta: self.meta.unwrap_or_default(),
108 }
109 }
110}