1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>The specified sync name wasn't found.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct ResourceDataSyncNotFoundException {
|
7 + | #[allow(missing_docs)] // documentation missing in model
|
8 + | pub sync_name: ::std::option::Option<::std::string::String>,
|
9 + | #[allow(missing_docs)] // documentation missing in model
|
10 + | pub sync_type: ::std::option::Option<::std::string::String>,
|
11 + | #[allow(missing_docs)] // documentation missing in model
|
12 + | pub message: ::std::option::Option<::std::string::String>,
|
13 + | pub(crate) meta: ::aws_smithy_types::error::ErrorMetadata,
|
14 + | }
|
15 + | impl ResourceDataSyncNotFoundException {
|
16 + | #[allow(missing_docs)] // documentation missing in model
|
17 + | pub fn sync_name(&self) -> ::std::option::Option<&str> {
|
18 + | self.sync_name.as_deref()
|
19 + | }
|
20 + | #[allow(missing_docs)] // documentation missing in model
|
21 + | pub fn sync_type(&self) -> ::std::option::Option<&str> {
|
22 + | self.sync_type.as_deref()
|
23 + | }
|
24 + | }
|
25 + | static RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
26 + | ::aws_smithy_schema::ShapeId::from_parts(
|
27 + | "com.amazonaws.ssm#ResourceDataSyncNotFoundException$SyncName",
|
28 + | "com.amazonaws.ssm",
|
29 + | "ResourceDataSyncNotFoundException",
|
30 + | ),
|
31 + | ::aws_smithy_schema::ShapeType::String,
|
32 + | "SyncName",
|
33 + | 0,
|
34 + | );
|
35 + | static RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_TYPE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
36 + | ::aws_smithy_schema::ShapeId::from_parts(
|
37 + | "com.amazonaws.ssm#ResourceDataSyncNotFoundException$SyncType",
|
38 + | "com.amazonaws.ssm",
|
39 + | "ResourceDataSyncNotFoundException",
|
40 + | ),
|
41 + | ::aws_smithy_schema::ShapeType::String,
|
42 + | "SyncType",
|
43 + | 1,
|
44 + | );
|
45 + | static RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_MESSAGE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
46 + | ::aws_smithy_schema::ShapeId::from_parts(
|
47 + | "com.amazonaws.ssm#ResourceDataSyncNotFoundException$Message",
|
48 + | "com.amazonaws.ssm",
|
49 + | "ResourceDataSyncNotFoundException",
|
50 + | ),
|
51 + | ::aws_smithy_schema::ShapeType::String,
|
52 + | "Message",
|
53 + | 2,
|
54 + | );
|
55 + | static RESOURCEDATASYNCNOTFOUNDEXCEPTION_TRAITS: std::sync::LazyLock<::aws_smithy_schema::TraitMap> = std::sync::LazyLock::new(|| {
|
56 + | let mut map = ::aws_smithy_schema::TraitMap::new();
|
57 + | map.insert(Box::new(::aws_smithy_schema::DocumentTrait::new(
|
58 + | ::aws_smithy_schema::ShapeId::from_parts("aws.protocols#awsQueryError", "aws.protocols", "awsQueryError"),
|
59 + | {
|
60 + | let mut obj = ::aws_smithy_types::document::DocumentObject::new();
|
61 + | obj.insert(
|
62 + | "code".to_string(),
|
63 + | ::aws_smithy_types::Document::String("ResourceDataSyncNotFound".to_string()),
|
64 + | );
|
65 + | obj.insert(
|
66 + | "httpResponseCode".to_string(),
|
67 + | ::aws_smithy_types::Document::Number(::aws_smithy_types::Number::PosInt(404u64)),
|
68 + | );
|
69 + | ::aws_smithy_types::Document::Object(obj)
|
70 + | },
|
71 + | )));
|
72 + | map
|
73 + | });
|
74 + | static RESOURCEDATASYNCNOTFOUNDEXCEPTION_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
75 + | ::aws_smithy_schema::ShapeId::from_parts(
|
76 + | "com.amazonaws.ssm#ResourceDataSyncNotFoundException",
|
77 + | "com.amazonaws.ssm",
|
78 + | "ResourceDataSyncNotFoundException",
|
79 + | ),
|
80 + | ::aws_smithy_schema::ShapeType::Structure,
|
81 + | &[
|
82 + | &RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_NAME,
|
83 + | &RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_TYPE,
|
84 + | &RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_MESSAGE,
|
85 + | ],
|
86 + | )
|
87 + | .with_traits(&RESOURCEDATASYNCNOTFOUNDEXCEPTION_TRAITS);
|
88 + | impl ResourceDataSyncNotFoundException {
|
89 + | /// The schema for this shape.
|
90 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &RESOURCEDATASYNCNOTFOUNDEXCEPTION_SCHEMA;
|
91 + | }
|
92 + | impl ::aws_smithy_schema::serde::SerializableStruct for ResourceDataSyncNotFoundException {
|
93 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
94 + | fn serialize_members(
|
95 + | &self,
|
96 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
97 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
98 + | if let Some(ref val) = self.sync_name {
|
99 + | ser.write_string(&RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_NAME, val)?;
|
100 + | }
|
101 + | if let Some(ref val) = self.sync_type {
|
102 + | ser.write_string(&RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_SYNC_TYPE, val)?;
|
103 + | }
|
104 + | if let Some(ref val) = self.message {
|
105 + | ser.write_string(&RESOURCEDATASYNCNOTFOUNDEXCEPTION_MEMBER_MESSAGE, val)?;
|
106 + | }
|
107 + | Ok(())
|
108 + | }
|
109 + | }
|
110 + | impl ResourceDataSyncNotFoundException {
|
111 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
112 + | pub fn deserialize(
|
113 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
114 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
115 + | #[allow(unused_variables, unused_mut)]
|
116 + | let mut builder = Self::builder();
|
117 + | #[allow(
|
118 + | unused_variables,
|
119 + | unreachable_code,
|
120 + | clippy::single_match,
|
121 + | clippy::match_single_binding,
|
122 + | clippy::diverging_sub_expression
|
123 + | )]
|
124 + | deserializer.read_struct(&RESOURCEDATASYNCNOTFOUNDEXCEPTION_SCHEMA, &mut |member, deser| {
|
125 + | match member.member_index() {
|
126 + | Some(0) => {
|
127 + | if deser.is_null() {
|
128 + | deser.read_null()?;
|
129 + | } else {
|
130 + | builder.sync_name = Some(deser.read_string(member)?);
|
131 + | }
|
132 + | }
|
133 + | Some(1) => {
|
134 + | if deser.is_null() {
|
135 + | deser.read_null()?;
|
136 + | } else {
|
137 + | builder.sync_type = Some(deser.read_string(member)?);
|
138 + | }
|
139 + | }
|
140 + | Some(2) => {
|
141 + | if deser.is_null() {
|
142 + | deser.read_null()?;
|
143 + | } else {
|
144 + | builder.message = Some(deser.read_string(member)?);
|
145 + | }
|
146 + | }
|
147 + | _ => {}
|
148 + | }
|
149 + | Ok(())
|
150 + | })?;
|
151 + | Ok(builder.build())
|
152 + | }
|
153 + | }
|
154 + | impl ResourceDataSyncNotFoundException {
|
155 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
156 + | pub fn deserialize_with_response(
|
157 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
158 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
159 + | _status: u16,
|
160 + | body: &[u8],
|
161 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
162 + | if body.is_empty() {
|
163 + | return Ok(Self::builder().build());
|
164 + | }
|
165 + | Self::deserialize(deserializer)
|
166 + | }
|
167 + | }
|
168 + | impl ResourceDataSyncNotFoundException {
|
169 + | /// Returns the error message.
|
170 + | pub fn message(&self) -> ::std::option::Option<&str> {
|
171 + | self.message.as_deref()
|
172 + | }
|
173 + | }
|
174 + | impl ::std::fmt::Display for ResourceDataSyncNotFoundException {
|
175 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
176 + | ::std::write!(f, "ResourceDataSyncNotFoundException")?;
|
177 + | if let ::std::option::Option::Some(inner_1) = &self.message {
|
178 + | {
|
179 + | ::std::write!(f, ": {inner_1}")?;
|
180 + | }
|
181 + | }
|
182 + | Ok(())
|
183 + | }
|
184 + | }
|
185 + | impl ::std::error::Error for ResourceDataSyncNotFoundException {}
|
186 + | impl ::aws_types::request_id::RequestId for crate::types::error::ResourceDataSyncNotFoundException {
|
187 + | fn request_id(&self) -> Option<&str> {
|
188 + | use ::aws_smithy_types::error::metadata::ProvideErrorMetadata;
|
189 + | self.meta().request_id()
|
190 + | }
|
191 + | }
|
192 + | impl ::aws_smithy_types::error::metadata::ProvideErrorMetadata for ResourceDataSyncNotFoundException {
|
193 + | fn meta(&self) -> &::aws_smithy_types::error::ErrorMetadata {
|
194 + | &self.meta
|
195 + | }
|
196 + | }
|
197 + | impl ResourceDataSyncNotFoundException {
|
198 + | /// Creates a new builder-style object to manufacture [`ResourceDataSyncNotFoundException`](crate::types::error::ResourceDataSyncNotFoundException).
|
199 + | pub fn builder() -> crate::types::error::builders::ResourceDataSyncNotFoundExceptionBuilder {
|
200 + | crate::types::error::builders::ResourceDataSyncNotFoundExceptionBuilder::default()
|
201 + | }
|
202 + | }
|
203 + |
|
204 + | /// A builder for [`ResourceDataSyncNotFoundException`](crate::types::error::ResourceDataSyncNotFoundException).
|
205 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
206 + | #[non_exhaustive]
|
207 + | pub struct ResourceDataSyncNotFoundExceptionBuilder {
|
208 + | pub(crate) sync_name: ::std::option::Option<::std::string::String>,
|
209 + | pub(crate) sync_type: ::std::option::Option<::std::string::String>,
|
210 + | pub(crate) message: ::std::option::Option<::std::string::String>,
|
211 + | meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>,
|
212 + | }
|
213 + | impl ResourceDataSyncNotFoundExceptionBuilder {
|
214 + | #[allow(missing_docs)] // documentation missing in model
|
215 + | pub fn sync_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
216 + | self.sync_name = ::std::option::Option::Some(input.into());
|
217 + | self
|
218 + | }
|
219 + | #[allow(missing_docs)] // documentation missing in model
|
220 + | pub fn set_sync_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
221 + | self.sync_name = input;
|
222 + | self
|
223 + | }
|
224 + | #[allow(missing_docs)] // documentation missing in model
|
225 + | pub fn get_sync_name(&self) -> &::std::option::Option<::std::string::String> {
|
226 + | &self.sync_name
|
227 + | }
|
228 + | #[allow(missing_docs)] // documentation missing in model
|
229 + | pub fn sync_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
230 + | self.sync_type = ::std::option::Option::Some(input.into());
|
231 + | self
|
232 + | }
|
233 + | #[allow(missing_docs)] // documentation missing in model
|
234 + | pub fn set_sync_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
235 + | self.sync_type = input;
|
236 + | self
|
237 + | }
|
238 + | #[allow(missing_docs)] // documentation missing in model
|
239 + | pub fn get_sync_type(&self) -> &::std::option::Option<::std::string::String> {
|
240 + | &self.sync_type
|
241 + | }
|
242 + | #[allow(missing_docs)] // documentation missing in model
|
243 + | pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
244 + | self.message = ::std::option::Option::Some(input.into());
|
245 + | self
|
246 + | }
|
247 + | #[allow(missing_docs)] // documentation missing in model
|
248 + | pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
249 + | self.message = input;
|
250 + | self
|
251 + | }
|
252 + | #[allow(missing_docs)] // documentation missing in model
|
253 + | pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
|
254 + | &self.message
|
255 + | }
|
256 + | /// Sets error metadata
|
257 + | pub fn meta(mut self, meta: ::aws_smithy_types::error::ErrorMetadata) -> Self {
|
258 + | self.meta = Some(meta);
|
259 + | self
|
260 + | }
|
261 + |
|
262 + | /// Sets error metadata
|
263 + | pub fn set_meta(&mut self, meta: std::option::Option<::aws_smithy_types::error::ErrorMetadata>) -> &mut Self {
|
264 + | self.meta = meta;
|
265 + | self
|
266 + | }
|
267 + | /// Consumes the builder and constructs a [`ResourceDataSyncNotFoundException`](crate::types::error::ResourceDataSyncNotFoundException).
|
268 + | pub fn build(self) -> crate::types::error::ResourceDataSyncNotFoundException {
|
269 + | crate::types::error::ResourceDataSyncNotFoundException {
|
270 + | sync_name: self.sync_name,
|
271 + | sync_type: self.sync_type,
|
272 + | message: self.message,
|
273 + | meta: self.meta.unwrap_or_default(),
|
274 + | }
|
275 + | }
|
276 + | }
|