1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[non_exhaustive]
|
4 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
5 + | pub struct ValidateCloudConnectorOutput {
|
6 + | /// <p>A list of validation findings for the cloud connector.</p>
|
7 + | pub validation_findings: ::std::option::Option<::std::vec::Vec<crate::types::ValidationFinding>>,
|
8 + | /// <p>The token to use when requesting the next set of items.</p>
|
9 + | pub next_token: ::std::option::Option<::std::string::String>,
|
10 + | _request_id: Option<String>,
|
11 + | }
|
12 + | impl ValidateCloudConnectorOutput {
|
13 + | /// <p>A list of validation findings for the cloud connector.</p>
|
14 + | ///
|
15 + | /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.validation_findings.is_none()`.
|
16 + | pub fn validation_findings(&self) -> &[crate::types::ValidationFinding] {
|
17 + | self.validation_findings.as_deref().unwrap_or_default()
|
18 + | }
|
19 + | /// <p>The token to use when requesting the next set of items.</p>
|
20 + | pub fn next_token(&self) -> ::std::option::Option<&str> {
|
21 + | self.next_token.as_deref()
|
22 + | }
|
23 + | }
|
24 + | static VALIDATECLOUDCONNECTOROUTPUT_MEMBER_VALIDATION_FINDINGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
25 + | ::aws_smithy_schema::ShapeId::from_parts(
|
26 + | "com.amazonaws.ssm#ValidationFindingList$member",
|
27 + | "com.amazonaws.ssm",
|
28 + | "ValidationFindingList",
|
29 + | ),
|
30 + | ::aws_smithy_schema::ShapeType::Structure,
|
31 + | "member",
|
32 + | 0,
|
33 + | );
|
34 + | static VALIDATECLOUDCONNECTOROUTPUT_MEMBER_VALIDATION_FINDINGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
35 + | ::aws_smithy_schema::ShapeId::from_parts(
|
36 + | "com.amazonaws.ssm.synthetic#ValidateCloudConnectorOutput$ValidationFindings",
|
37 + | "com.amazonaws.ssm.synthetic",
|
38 + | "ValidateCloudConnectorOutput",
|
39 + | ),
|
40 + | ::aws_smithy_schema::ShapeType::List,
|
41 + | "ValidationFindings",
|
42 + | 0,
|
43 + | )
|
44 + | .with_list_member(&VALIDATECLOUDCONNECTOROUTPUT_MEMBER_VALIDATION_FINDINGS_MEMBER);
|
45 + | static VALIDATECLOUDCONNECTOROUTPUT_MEMBER_NEXT_TOKEN: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
46 + | ::aws_smithy_schema::ShapeId::from_parts(
|
47 + | "com.amazonaws.ssm.synthetic#ValidateCloudConnectorOutput$NextToken",
|
48 + | "com.amazonaws.ssm.synthetic",
|
49 + | "ValidateCloudConnectorOutput",
|
50 + | ),
|
51 + | ::aws_smithy_schema::ShapeType::String,
|
52 + | "NextToken",
|
53 + | 1,
|
54 + | );
|
55 + | static VALIDATECLOUDCONNECTOROUTPUT_MEMBER__REQUEST_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
|
56 + | ::aws_smithy_schema::ShapeId::from_parts("synthetic#request_id", "synthetic", "request_id"),
|
57 + | ::aws_smithy_schema::ShapeType::String,
|
58 + | "request_id",
|
59 + | 2,
|
60 + | )
|
61 + | .with_http_header("x-amzn-requestid");
|
62 + | static VALIDATECLOUDCONNECTOROUTPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
|
63 + | ::aws_smithy_schema::ShapeId::from_parts(
|
64 + | "com.amazonaws.ssm.synthetic#ValidateCloudConnectorOutput",
|
65 + | "com.amazonaws.ssm.synthetic",
|
66 + | "ValidateCloudConnectorOutput",
|
67 + | ),
|
68 + | ::aws_smithy_schema::ShapeType::Structure,
|
69 + | &[
|
70 + | &VALIDATECLOUDCONNECTOROUTPUT_MEMBER_VALIDATION_FINDINGS,
|
71 + | &VALIDATECLOUDCONNECTOROUTPUT_MEMBER_NEXT_TOKEN,
|
72 + | &VALIDATECLOUDCONNECTOROUTPUT_MEMBER__REQUEST_ID,
|
73 + | ],
|
74 + | )
|
75 + | .with_original_name("ValidateCloudConnectorResult");
|
76 + | impl ValidateCloudConnectorOutput {
|
77 + | /// The schema for this shape.
|
78 + | pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &VALIDATECLOUDCONNECTOROUTPUT_SCHEMA;
|
79 + | }
|
80 + | impl ::aws_smithy_schema::serde::SerializableStruct for ValidateCloudConnectorOutput {
|
81 + | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
82 + | fn serialize_members(
|
83 + | &self,
|
84 + | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
85 + | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
86 + | if let Some(ref val) = self.validation_findings {
|
87 + | ser.write_list(
|
88 + | &VALIDATECLOUDCONNECTOROUTPUT_MEMBER_VALIDATION_FINDINGS,
|
89 + | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
90 + | for item in val {
|
91 + | ser.write_struct(crate::types::ValidationFinding::SCHEMA, item)?;
|
92 + | }
|
93 + | Ok(())
|
94 + | },
|
95 + | )?;
|
96 + | }
|
97 + | if let Some(ref val) = self.next_token {
|
98 + | ser.write_string(&VALIDATECLOUDCONNECTOROUTPUT_MEMBER_NEXT_TOKEN, val)?;
|
99 + | }
|
100 + | Ok(())
|
101 + | }
|
102 + | }
|
103 + | impl ValidateCloudConnectorOutput {
|
104 + | /// Deserializes this structure from a [`ShapeDeserializer`].
|
105 + | pub fn deserialize(
|
106 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
107 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
108 + | #[allow(unused_variables, unused_mut)]
|
109 + | let mut builder = Self::builder();
|
110 + | #[allow(
|
111 + | unused_variables,
|
112 + | unreachable_code,
|
113 + | clippy::single_match,
|
114 + | clippy::match_single_binding,
|
115 + | clippy::diverging_sub_expression
|
116 + | )]
|
117 + | deserializer.read_struct(&VALIDATECLOUDCONNECTOROUTPUT_SCHEMA, &mut |member, deser| {
|
118 + | match member.member_index() {
|
119 + | Some(0) => {
|
120 + | if deser.is_null() {
|
121 + | deser.read_null()?;
|
122 + | } else {
|
123 + | builder.validation_findings = Some({
|
124 + | let mut container = Vec::new();
|
125 + | deser.read_list(member, &mut |deser| {
|
126 + | container.push(crate::types::ValidationFinding::deserialize(deser)?);
|
127 + | Ok(())
|
128 + | })?;
|
129 + | container
|
130 + | });
|
131 + | }
|
132 + | }
|
133 + | Some(1) => {
|
134 + | if deser.is_null() {
|
135 + | deser.read_null()?;
|
136 + | } else {
|
137 + | builder.next_token = Some(deser.read_string(member)?);
|
138 + | }
|
139 + | }
|
140 + | Some(2) => {
|
141 + | builder._request_id = Some(deser.read_string(member)?);
|
142 + | }
|
143 + | _ => {}
|
144 + | }
|
145 + | Ok(())
|
146 + | })?;
|
147 + | Ok(builder.build())
|
148 + | }
|
149 + | }
|
150 + | impl ValidateCloudConnectorOutput {
|
151 + | /// Deserializes this structure from a body deserializer and HTTP response headers.
|
152 + | /// Header-bound members are read directly from headers, avoiding runtime
|
153 + | /// member iteration overhead. Body members are read via the deserializer.
|
154 + | pub fn deserialize_with_response(
|
155 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
156 + | headers: &::aws_smithy_runtime_api::http::Headers,
|
157 + | _status: u16,
|
158 + | _body: &[u8],
|
159 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
160 + | #[allow(unused_variables, unused_mut)]
|
161 + | let mut builder = Self::builder();
|
162 + | if let Some(val) = headers.get("x-amzn-requestid") {
|
163 + | builder._request_id = Some(val.to_string());
|
164 + | }
|
165 + |
|
166 + | #[allow(
|
167 + | unused_variables,
|
168 + | unreachable_code,
|
169 + | clippy::single_match,
|
170 + | clippy::match_single_binding,
|
171 + | clippy::diverging_sub_expression
|
172 + | )]
|
173 + | deserializer.read_struct(&VALIDATECLOUDCONNECTOROUTPUT_SCHEMA, &mut |member, deser| {
|
174 + | match member.member_index() {
|
175 + | Some(0) => {
|
176 + | builder.validation_findings = Some({
|
177 + | let mut container = Vec::new();
|
178 + | deser.read_list(member, &mut |deser| {
|
179 + | container.push(crate::types::ValidationFinding::deserialize(deser)?);
|
180 + | Ok(())
|
181 + | })?;
|
182 + | container
|
183 + | });
|
184 + | }
|
185 + | Some(1) => {
|
186 + | builder.next_token = Some(deser.read_string(member)?);
|
187 + | }
|
188 + | _ => {}
|
189 + | }
|
190 + | Ok(())
|
191 + | })?;
|
192 + | Ok(builder.build())
|
193 + | }
|
194 + | }
|
195 + | impl ::aws_types::request_id::RequestId for ValidateCloudConnectorOutput {
|
196 + | fn request_id(&self) -> Option<&str> {
|
197 + | self._request_id.as_deref()
|
198 + | }
|
199 + | }
|
200 + | impl ValidateCloudConnectorOutput {
|
201 + | pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
|
202 + | self._request_id = request_id;
|
203 + | self
|
204 + | }
|
205 + | }
|
206 + | impl ValidateCloudConnectorOutput {
|
207 + | /// Creates a new builder-style object to manufacture [`ValidateCloudConnectorOutput`](crate::operation::validate_cloud_connector::ValidateCloudConnectorOutput).
|
208 + | pub fn builder() -> crate::operation::validate_cloud_connector::builders::ValidateCloudConnectorOutputBuilder {
|
209 + | crate::operation::validate_cloud_connector::builders::ValidateCloudConnectorOutputBuilder::default()
|
210 + | }
|
211 + | }
|
212 + |
|
213 + | /// A builder for [`ValidateCloudConnectorOutput`](crate::operation::validate_cloud_connector::ValidateCloudConnectorOutput).
|
214 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
215 + | #[non_exhaustive]
|
216 + | pub struct ValidateCloudConnectorOutputBuilder {
|
217 + | pub(crate) validation_findings: ::std::option::Option<::std::vec::Vec<crate::types::ValidationFinding>>,
|
218 + | pub(crate) next_token: ::std::option::Option<::std::string::String>,
|
219 + | _request_id: Option<String>,
|
220 + | }
|
221 + | impl ValidateCloudConnectorOutputBuilder {
|
222 + | /// Appends an item to `validation_findings`.
|
223 + | ///
|
224 + | /// To override the contents of this collection use [`set_validation_findings`](Self::set_validation_findings).
|
225 + | ///
|
226 + | /// <p>A list of validation findings for the cloud connector.</p>
|
227 + | pub fn validation_findings(mut self, input: crate::types::ValidationFinding) -> Self {
|
228 + | let mut v = self.validation_findings.unwrap_or_default();
|
229 + | v.push(input);
|
230 + | self.validation_findings = ::std::option::Option::Some(v);
|
231 + | self
|
232 + | }
|
233 + | /// <p>A list of validation findings for the cloud connector.</p>
|
234 + | pub fn set_validation_findings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ValidationFinding>>) -> Self {
|
235 + | self.validation_findings = input;
|
236 + | self
|
237 + | }
|
238 + | /// <p>A list of validation findings for the cloud connector.</p>
|
239 + | pub fn get_validation_findings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ValidationFinding>> {
|
240 + | &self.validation_findings
|
241 + | }
|
242 + | /// <p>The token to use when requesting the next set of items.</p>
|
243 + | pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
244 + | self.next_token = ::std::option::Option::Some(input.into());
|
245 + | self
|
246 + | }
|
247 + | /// <p>The token to use when requesting the next set of items.</p>
|
248 + | pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
249 + | self.next_token = input;
|
250 + | self
|
251 + | }
|
252 + | /// <p>The token to use when requesting the next set of items.</p>
|
253 + | pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
|
254 + | &self.next_token
|
255 + | }
|
256 + | pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
|
257 + | self._request_id = Some(request_id.into());
|
258 + | self
|
259 + | }
|
260 + |
|
261 + | pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
|
262 + | self._request_id = request_id;
|
263 + | self
|
264 + | }
|
265 + | /// Consumes the builder and constructs a [`ValidateCloudConnectorOutput`](crate::operation::validate_cloud_connector::ValidateCloudConnectorOutput).
|
266 + | pub fn build(self) -> crate::operation::validate_cloud_connector::ValidateCloudConnectorOutput {
|
267 + | crate::operation::validate_cloud_connector::ValidateCloudConnectorOutput {
|
268 + | validation_findings: self.validation_findings,
|
269 + | next_token: self.next_token,
|
270 + | _request_id: self._request_id,
|
271 + | }
|
272 + | }
|
273 + | }
|