1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 2 | #[allow(missing_docs)] // documentation missing in model
|
3 3 | #[derive(
|
4 4 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
5 5 | )]
|
6 - | pub struct QueryIncompatibleOperationInput {}
|
7 - | impl QueryIncompatibleOperationInput {
|
8 - | /// Creates a new builder-style object to manufacture [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
9 - | pub fn builder() -> crate::input::query_incompatible_operation_input::Builder {
|
10 - | crate::input::query_incompatible_operation_input::Builder::default()
|
6 + | pub struct NoInputAndNoOutputInput {}
|
7 + | impl NoInputAndNoOutputInput {
|
8 + | /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
9 + | pub fn builder() -> crate::input::no_input_and_no_output_input::Builder {
|
10 + | crate::input::no_input_and_no_output_input::Builder::default()
|
11 11 | }
|
12 12 | }
|
13 - | impl crate::constrained::Constrained for crate::input::QueryIncompatibleOperationInput {
|
14 - | type Unconstrained = crate::input::query_incompatible_operation_input::Builder;
|
13 + | impl crate::constrained::Constrained for crate::input::NoInputAndNoOutputInput {
|
14 + | type Unconstrained = crate::input::no_input_and_no_output_input::Builder;
|
15 15 | }
|
16 16 |
|
17 17 | #[allow(missing_docs)] // documentation missing in model
|
18 18 | #[derive(
|
19 19 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
20 20 | )]
|
21 - | pub struct OperationWithRequiredMembersWithDefaultsInput {}
|
22 - | impl OperationWithRequiredMembersWithDefaultsInput {
|
23 - | /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
24 - | pub fn builder() -> crate::input::operation_with_required_members_with_defaults_input::Builder {
|
25 - | crate::input::operation_with_required_members_with_defaults_input::Builder::default()
|
26 - | }
|
27 - | }
|
28 - | impl crate::constrained::Constrained
|
29 - | for crate::input::OperationWithRequiredMembersWithDefaultsInput
|
30 - | {
|
31 - | type Unconstrained = crate::input::operation_with_required_members_with_defaults_input::Builder;
|
32 - | }
|
33 - |
|
34 - | #[allow(missing_docs)] // documentation missing in model
|
35 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
36 - | pub struct OperationWithNestedStructureInput {
|
37 - | #[allow(missing_docs)] // documentation missing in model
|
38 - | pub top_level: crate::model::TopLevel,
|
39 - | }
|
40 - | impl OperationWithNestedStructureInput {
|
41 - | #[allow(missing_docs)] // documentation missing in model
|
42 - | pub fn top_level(&self) -> &crate::model::TopLevel {
|
43 - | &self.top_level
|
44 - | }
|
45 - | }
|
46 - | impl OperationWithNestedStructureInput {
|
47 - | /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
48 - | pub fn builder() -> crate::input::operation_with_nested_structure_input::Builder {
|
49 - | crate::input::operation_with_nested_structure_input::Builder::default()
|
21 + | pub struct NoInputAndOutputInput {}
|
22 + | impl NoInputAndOutputInput {
|
23 + | /// Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
24 + | pub fn builder() -> crate::input::no_input_and_output_input::Builder {
|
25 + | crate::input::no_input_and_output_input::Builder::default()
|
50 26 | }
|
51 27 | }
|
52 - | impl crate::constrained::Constrained for crate::input::OperationWithNestedStructureInput {
|
53 - | type Unconstrained = crate::input::operation_with_nested_structure_input::Builder;
|
28 + | impl crate::constrained::Constrained for crate::input::NoInputAndOutputInput {
|
29 + | type Unconstrained = crate::input::no_input_and_output_input::Builder;
|
54 30 | }
|
55 31 |
|
56 32 | #[allow(missing_docs)] // documentation missing in model
|
57 33 | #[derive(
|
58 34 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
59 35 | )]
|
60 - | pub struct OperationWithRequiredMembersInput {}
|
61 - | impl OperationWithRequiredMembersInput {
|
62 - | /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
63 - | pub fn builder() -> crate::input::operation_with_required_members_input::Builder {
|
64 - | crate::input::operation_with_required_members_input::Builder::default()
|
36 + | pub struct EmptyInputAndEmptyOutputInput {}
|
37 + | impl EmptyInputAndEmptyOutputInput {
|
38 + | /// Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
39 + | pub fn builder() -> crate::input::empty_input_and_empty_output_input::Builder {
|
40 + | crate::input::empty_input_and_empty_output_input::Builder::default()
|
65 41 | }
|
66 42 | }
|
67 - | impl crate::constrained::Constrained for crate::input::OperationWithRequiredMembersInput {
|
68 - | type Unconstrained = crate::input::operation_with_required_members_input::Builder;
|
43 + | impl crate::constrained::Constrained for crate::input::EmptyInputAndEmptyOutputInput {
|
44 + | type Unconstrained = crate::input::empty_input_and_empty_output_input::Builder;
|
69 45 | }
|
70 46 |
|
71 47 | #[allow(missing_docs)] // documentation missing in model
|
72 48 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
73 - | pub struct OperationWithDefaultsInput {
|
74 - | #[allow(missing_docs)] // documentation missing in model
|
75 - | pub defaults: ::std::option::Option<crate::model::Defaults>,
|
76 - | #[allow(missing_docs)] // documentation missing in model
|
77 - | pub client_optional_defaults: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
49 + | pub struct SimpleScalarPropertiesInput {
|
78 50 | #[allow(missing_docs)] // documentation missing in model
|
79 - | pub top_level_default: ::std::string::String,
|
51 + | pub float_value: ::std::option::Option<f32>,
|
80 52 | #[allow(missing_docs)] // documentation missing in model
|
81 - | pub other_top_level_default: i32,
|
53 + | pub double_value: ::std::option::Option<f64>,
|
82 54 | }
|
83 - | impl OperationWithDefaultsInput {
|
84 - | #[allow(missing_docs)] // documentation missing in model
|
85 - | pub fn defaults(&self) -> ::std::option::Option<&crate::model::Defaults> {
|
86 - | self.defaults.as_ref()
|
87 - | }
|
88 - | #[allow(missing_docs)] // documentation missing in model
|
89 - | pub fn client_optional_defaults(
|
90 - | &self,
|
91 - | ) -> ::std::option::Option<&crate::model::ClientOptionalDefaults> {
|
92 - | self.client_optional_defaults.as_ref()
|
93 - | }
|
55 + | impl SimpleScalarPropertiesInput {
|
94 56 | #[allow(missing_docs)] // documentation missing in model
|
95 - | pub fn top_level_default(&self) -> &str {
|
96 - | use std::ops::Deref;
|
97 - | self.top_level_default.deref()
|
57 + | pub fn float_value(&self) -> ::std::option::Option<f32> {
|
58 + | self.float_value
|
98 59 | }
|
99 60 | #[allow(missing_docs)] // documentation missing in model
|
100 - | pub fn other_top_level_default(&self) -> i32 {
|
101 - | self.other_top_level_default
|
61 + | pub fn double_value(&self) -> ::std::option::Option<f64> {
|
62 + | self.double_value
|
102 63 | }
|
103 64 | }
|
104 - | impl OperationWithDefaultsInput {
|
105 - | /// Creates a new builder-style object to manufacture [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
106 - | pub fn builder() -> crate::input::operation_with_defaults_input::Builder {
|
107 - | crate::input::operation_with_defaults_input::Builder::default()
|
65 + | impl SimpleScalarPropertiesInput {
|
66 + | /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
67 + | pub fn builder() -> crate::input::simple_scalar_properties_input::Builder {
|
68 + | crate::input::simple_scalar_properties_input::Builder::default()
|
108 69 | }
|
109 70 | }
|
110 - | impl crate::constrained::Constrained for crate::input::OperationWithDefaultsInput {
|
111 - | type Unconstrained = crate::input::operation_with_defaults_input::Builder;
|
71 + | impl crate::constrained::Constrained for crate::input::SimpleScalarPropertiesInput {
|
72 + | type Unconstrained = crate::input::simple_scalar_properties_input::Builder;
|
112 73 | }
|
113 74 |
|
114 75 | #[allow(missing_docs)] // documentation missing in model
|
115 76 | #[derive(
|
116 77 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
117 78 | )]
|
118 - | pub struct ContentTypeParametersInput {
|
79 + | pub struct GreetingWithErrorsInput {
|
119 80 | #[allow(missing_docs)] // documentation missing in model
|
120 - | pub value: ::std::option::Option<i32>,
|
81 + | pub greeting: ::std::option::Option<::std::string::String>,
|
121 82 | }
|
122 - | impl ContentTypeParametersInput {
|
83 + | impl GreetingWithErrorsInput {
|
123 84 | #[allow(missing_docs)] // documentation missing in model
|
124 - | pub fn value(&self) -> ::std::option::Option<i32> {
|
125 - | self.value
|
85 + | pub fn greeting(&self) -> ::std::option::Option<&str> {
|
86 + | self.greeting.as_deref()
|
126 87 | }
|
127 88 | }
|
128 - | impl ContentTypeParametersInput {
|
129 - | /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
130 - | pub fn builder() -> crate::input::content_type_parameters_input::Builder {
|
131 - | crate::input::content_type_parameters_input::Builder::default()
|
89 + | impl GreetingWithErrorsInput {
|
90 + | /// Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
91 + | pub fn builder() -> crate::input::greeting_with_errors_input::Builder {
|
92 + | crate::input::greeting_with_errors_input::Builder::default()
|
132 93 | }
|
133 94 | }
|
134 - | impl crate::constrained::Constrained for crate::input::ContentTypeParametersInput {
|
135 - | type Unconstrained = crate::input::content_type_parameters_input::Builder;
|
95 + | impl crate::constrained::Constrained for crate::input::GreetingWithErrorsInput {
|
96 + | type Unconstrained = crate::input::greeting_with_errors_input::Builder;
|
136 97 | }
|
137 98 |
|
138 99 | #[allow(missing_docs)] // documentation missing in model
|
139 - | #[derive(
|
140 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
141 - | )]
|
142 - | pub struct PutWithContentEncodingInput {
|
143 - | #[allow(missing_docs)] // documentation missing in model
|
144 - | pub encoding: ::std::option::Option<::std::string::String>,
|
145 - | #[allow(missing_docs)] // documentation missing in model
|
146 - | pub data: ::std::option::Option<::std::string::String>,
|
100 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
101 + | pub struct JsonUnionsInput {
|
102 + | /// A union with a representative set of types for members.
|
103 + | pub contents: ::std::option::Option<crate::model::MyUnion>,
|
147 104 | }
|
148 - | impl PutWithContentEncodingInput {
|
149 - | #[allow(missing_docs)] // documentation missing in model
|
150 - | pub fn encoding(&self) -> ::std::option::Option<&str> {
|
151 - | self.encoding.as_deref()
|
152 - | }
|
153 - | #[allow(missing_docs)] // documentation missing in model
|
154 - | pub fn data(&self) -> ::std::option::Option<&str> {
|
155 - | self.data.as_deref()
|
105 + | impl JsonUnionsInput {
|
106 + | /// A union with a representative set of types for members.
|
107 + | pub fn contents(&self) -> ::std::option::Option<&crate::model::MyUnion> {
|
108 + | self.contents.as_ref()
|
156 109 | }
|
157 110 | }
|
158 - | impl PutWithContentEncodingInput {
|
159 - | /// Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
160 - | pub fn builder() -> crate::input::put_with_content_encoding_input::Builder {
|
161 - | crate::input::put_with_content_encoding_input::Builder::default()
|
111 + | impl JsonUnionsInput {
|
112 + | /// Creates a new builder-style object to manufacture [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
113 + | pub fn builder() -> crate::input::json_unions_input::Builder {
|
114 + | crate::input::json_unions_input::Builder::default()
|
162 115 | }
|
163 116 | }
|
164 - | impl crate::constrained::Constrained for crate::input::PutWithContentEncodingInput {
|
165 - | type Unconstrained = crate::input::put_with_content_encoding_input::Builder;
|
117 + | impl crate::constrained::Constrained for crate::input::JsonUnionsInput {
|
118 + | type Unconstrained = crate::input::json_unions_input::Builder;
|
166 119 | }
|
167 120 |
|
168 121 | #[allow(missing_docs)] // documentation missing in model
|
169 122 | #[derive(
|
170 123 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
171 124 | )]
|
172 - | pub struct HostWithPathOperationInput {}
|
173 - | impl HostWithPathOperationInput {
|
174 - | /// Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
175 - | pub fn builder() -> crate::input::host_with_path_operation_input::Builder {
|
176 - | crate::input::host_with_path_operation_input::Builder::default()
|
125 + | pub struct EndpointOperationInput {}
|
126 + | impl EndpointOperationInput {
|
127 + | /// Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
128 + | pub fn builder() -> crate::input::endpoint_operation_input::Builder {
|
129 + | crate::input::endpoint_operation_input::Builder::default()
|
177 130 | }
|
178 131 | }
|
179 - | impl crate::constrained::Constrained for crate::input::HostWithPathOperationInput {
|
180 - | type Unconstrained = crate::input::host_with_path_operation_input::Builder;
|
132 + | impl crate::constrained::Constrained for crate::input::EndpointOperationInput {
|
133 + | type Unconstrained = crate::input::endpoint_operation_input::Builder;
|
181 134 | }
|
182 135 |
|
183 136 | #[allow(missing_docs)] // documentation missing in model
|
184 137 | #[derive(
|
185 138 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
186 139 | )]
|
187 140 | pub struct EndpointWithHostLabelOperationInput {
|
188 141 | #[allow(missing_docs)] // documentation missing in model
|
189 142 | pub label: ::std::string::String,
|
190 143 | }
|
191 144 | impl EndpointWithHostLabelOperationInput {
|
192 145 | #[allow(missing_docs)] // documentation missing in model
|
193 146 | pub fn label(&self) -> &str {
|
194 147 | use std::ops::Deref;
|
195 148 | self.label.deref()
|
196 149 | }
|
197 150 | }
|
198 151 | impl EndpointWithHostLabelOperationInput {
|
199 152 | /// Creates a new builder-style object to manufacture [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
200 153 | pub fn builder() -> crate::input::endpoint_with_host_label_operation_input::Builder {
|
201 154 | crate::input::endpoint_with_host_label_operation_input::Builder::default()
|
202 155 | }
|
203 156 | }
|
204 157 | impl crate::constrained::Constrained for crate::input::EndpointWithHostLabelOperationInput {
|
205 158 | type Unconstrained = crate::input::endpoint_with_host_label_operation_input::Builder;
|
206 159 | }
|
207 160 |
|
208 161 | #[allow(missing_docs)] // documentation missing in model
|
209 162 | #[derive(
|
210 163 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
211 164 | )]
|
212 - | pub struct EndpointOperationInput {}
|
213 - | impl EndpointOperationInput {
|
214 - | /// Creates a new builder-style object to manufacture [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
215 - | pub fn builder() -> crate::input::endpoint_operation_input::Builder {
|
216 - | crate::input::endpoint_operation_input::Builder::default()
|
165 + | pub struct HostWithPathOperationInput {}
|
166 + | impl HostWithPathOperationInput {
|
167 + | /// Creates a new builder-style object to manufacture [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
168 + | pub fn builder() -> crate::input::host_with_path_operation_input::Builder {
|
169 + | crate::input::host_with_path_operation_input::Builder::default()
|
217 170 | }
|
218 171 | }
|
219 - | impl crate::constrained::Constrained for crate::input::EndpointOperationInput {
|
220 - | type Unconstrained = crate::input::endpoint_operation_input::Builder;
|
172 + | impl crate::constrained::Constrained for crate::input::HostWithPathOperationInput {
|
173 + | type Unconstrained = crate::input::host_with_path_operation_input::Builder;
|
221 174 | }
|
222 175 |
|
223 176 | #[allow(missing_docs)] // documentation missing in model
|
224 - | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
225 - | pub struct JsonUnionsInput {
|
226 - | /// A union with a representative set of types for members.
|
227 - | pub contents: ::std::option::Option<crate::model::MyUnion>,
|
177 + | #[derive(
|
178 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
179 + | )]
|
180 + | pub struct PutWithContentEncodingInput {
|
181 + | #[allow(missing_docs)] // documentation missing in model
|
182 + | pub encoding: ::std::option::Option<::std::string::String>,
|
183 + | #[allow(missing_docs)] // documentation missing in model
|
184 + | pub data: ::std::option::Option<::std::string::String>,
|
228 185 | }
|
229 - | impl JsonUnionsInput {
|
230 - | /// A union with a representative set of types for members.
|
231 - | pub fn contents(&self) -> ::std::option::Option<&crate::model::MyUnion> {
|
232 - | self.contents.as_ref()
|
186 + | impl PutWithContentEncodingInput {
|
187 + | #[allow(missing_docs)] // documentation missing in model
|
188 + | pub fn encoding(&self) -> ::std::option::Option<&str> {
|
189 + | self.encoding.as_deref()
|
190 + | }
|
191 + | #[allow(missing_docs)] // documentation missing in model
|
192 + | pub fn data(&self) -> ::std::option::Option<&str> {
|
193 + | self.data.as_deref()
|
233 194 | }
|
234 195 | }
|
235 - | impl JsonUnionsInput {
|
236 - | /// Creates a new builder-style object to manufacture [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
237 - | pub fn builder() -> crate::input::json_unions_input::Builder {
|
238 - | crate::input::json_unions_input::Builder::default()
|
196 + | impl PutWithContentEncodingInput {
|
197 + | /// Creates a new builder-style object to manufacture [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
198 + | pub fn builder() -> crate::input::put_with_content_encoding_input::Builder {
|
199 + | crate::input::put_with_content_encoding_input::Builder::default()
|
239 200 | }
|
240 201 | }
|
241 - | impl crate::constrained::Constrained for crate::input::JsonUnionsInput {
|
242 - | type Unconstrained = crate::input::json_unions_input::Builder;
|
202 + | impl crate::constrained::Constrained for crate::input::PutWithContentEncodingInput {
|
203 + | type Unconstrained = crate::input::put_with_content_encoding_input::Builder;
|
243 204 | }
|
244 205 |
|
245 206 | #[allow(missing_docs)] // documentation missing in model
|
246 207 | #[derive(
|
247 208 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
248 209 | )]
|
249 - | pub struct GreetingWithErrorsInput {
|
210 + | pub struct ContentTypeParametersInput {
|
250 211 | #[allow(missing_docs)] // documentation missing in model
|
251 - | pub greeting: ::std::option::Option<::std::string::String>,
|
212 + | pub value: ::std::option::Option<i32>,
|
252 213 | }
|
253 - | impl GreetingWithErrorsInput {
|
214 + | impl ContentTypeParametersInput {
|
254 215 | #[allow(missing_docs)] // documentation missing in model
|
255 - | pub fn greeting(&self) -> ::std::option::Option<&str> {
|
256 - | self.greeting.as_deref()
|
216 + | pub fn value(&self) -> ::std::option::Option<i32> {
|
217 + | self.value
|
257 218 | }
|
258 219 | }
|
259 - | impl GreetingWithErrorsInput {
|
260 - | /// Creates a new builder-style object to manufacture [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
261 - | pub fn builder() -> crate::input::greeting_with_errors_input::Builder {
|
262 - | crate::input::greeting_with_errors_input::Builder::default()
|
220 + | impl ContentTypeParametersInput {
|
221 + | /// Creates a new builder-style object to manufacture [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
222 + | pub fn builder() -> crate::input::content_type_parameters_input::Builder {
|
223 + | crate::input::content_type_parameters_input::Builder::default()
|
263 224 | }
|
264 225 | }
|
265 - | impl crate::constrained::Constrained for crate::input::GreetingWithErrorsInput {
|
266 - | type Unconstrained = crate::input::greeting_with_errors_input::Builder;
|
226 + | impl crate::constrained::Constrained for crate::input::ContentTypeParametersInput {
|
227 + | type Unconstrained = crate::input::content_type_parameters_input::Builder;
|
267 228 | }
|
268 229 |
|
269 230 | #[allow(missing_docs)] // documentation missing in model
|
270 231 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
271 - | pub struct SimpleScalarPropertiesInput {
|
232 + | pub struct OperationWithDefaultsInput {
|
272 233 | #[allow(missing_docs)] // documentation missing in model
|
273 - | pub float_value: ::std::option::Option<f32>,
|
234 + | pub defaults: ::std::option::Option<crate::model::Defaults>,
|
274 235 | #[allow(missing_docs)] // documentation missing in model
|
275 - | pub double_value: ::std::option::Option<f64>,
|
236 + | pub client_optional_defaults: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
237 + | #[allow(missing_docs)] // documentation missing in model
|
238 + | pub top_level_default: ::std::string::String,
|
239 + | #[allow(missing_docs)] // documentation missing in model
|
240 + | pub other_top_level_default: i32,
|
276 241 | }
|
277 - | impl SimpleScalarPropertiesInput {
|
242 + | impl OperationWithDefaultsInput {
|
278 243 | #[allow(missing_docs)] // documentation missing in model
|
279 - | pub fn float_value(&self) -> ::std::option::Option<f32> {
|
280 - | self.float_value
|
244 + | pub fn defaults(&self) -> ::std::option::Option<&crate::model::Defaults> {
|
245 + | self.defaults.as_ref()
|
281 246 | }
|
282 247 | #[allow(missing_docs)] // documentation missing in model
|
283 - | pub fn double_value(&self) -> ::std::option::Option<f64> {
|
284 - | self.double_value
|
248 + | pub fn client_optional_defaults(
|
249 + | &self,
|
250 + | ) -> ::std::option::Option<&crate::model::ClientOptionalDefaults> {
|
251 + | self.client_optional_defaults.as_ref()
|
252 + | }
|
253 + | #[allow(missing_docs)] // documentation missing in model
|
254 + | pub fn top_level_default(&self) -> &str {
|
255 + | use std::ops::Deref;
|
256 + | self.top_level_default.deref()
|
257 + | }
|
258 + | #[allow(missing_docs)] // documentation missing in model
|
259 + | pub fn other_top_level_default(&self) -> i32 {
|
260 + | self.other_top_level_default
|
285 261 | }
|
286 262 | }
|
287 - | impl SimpleScalarPropertiesInput {
|
288 - | /// Creates a new builder-style object to manufacture [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
289 - | pub fn builder() -> crate::input::simple_scalar_properties_input::Builder {
|
290 - | crate::input::simple_scalar_properties_input::Builder::default()
|
263 + | impl OperationWithDefaultsInput {
|
264 + | /// Creates a new builder-style object to manufacture [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
265 + | pub fn builder() -> crate::input::operation_with_defaults_input::Builder {
|
266 + | crate::input::operation_with_defaults_input::Builder::default()
|
291 267 | }
|
292 268 | }
|
293 - | impl crate::constrained::Constrained for crate::input::SimpleScalarPropertiesInput {
|
294 - | type Unconstrained = crate::input::simple_scalar_properties_input::Builder;
|
269 + | impl crate::constrained::Constrained for crate::input::OperationWithDefaultsInput {
|
270 + | type Unconstrained = crate::input::operation_with_defaults_input::Builder;
|
295 271 | }
|
296 272 |
|
297 273 | #[allow(missing_docs)] // documentation missing in model
|
298 274 | #[derive(
|
299 275 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
300 276 | )]
|
301 - | pub struct EmptyInputAndEmptyOutputInput {}
|
302 - | impl EmptyInputAndEmptyOutputInput {
|
303 - | /// Creates a new builder-style object to manufacture [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
304 - | pub fn builder() -> crate::input::empty_input_and_empty_output_input::Builder {
|
305 - | crate::input::empty_input_and_empty_output_input::Builder::default()
|
277 + | pub struct OperationWithRequiredMembersInput {}
|
278 + | impl OperationWithRequiredMembersInput {
|
279 + | /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
280 + | pub fn builder() -> crate::input::operation_with_required_members_input::Builder {
|
281 + | crate::input::operation_with_required_members_input::Builder::default()
|
306 282 | }
|
307 283 | }
|
308 - | impl crate::constrained::Constrained for crate::input::EmptyInputAndEmptyOutputInput {
|
309 - | type Unconstrained = crate::input::empty_input_and_empty_output_input::Builder;
|
284 + | impl crate::constrained::Constrained for crate::input::OperationWithRequiredMembersInput {
|
285 + | type Unconstrained = crate::input::operation_with_required_members_input::Builder;
|
286 + | }
|
287 + |
|
288 + | #[allow(missing_docs)] // documentation missing in model
|
289 + | #[derive(::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
290 + | pub struct OperationWithNestedStructureInput {
|
291 + | #[allow(missing_docs)] // documentation missing in model
|
292 + | pub top_level: crate::model::TopLevel,
|
293 + | }
|
294 + | impl OperationWithNestedStructureInput {
|
295 + | #[allow(missing_docs)] // documentation missing in model
|
296 + | pub fn top_level(&self) -> &crate::model::TopLevel {
|
297 + | &self.top_level
|
298 + | }
|
299 + | }
|
300 + | impl OperationWithNestedStructureInput {
|
301 + | /// Creates a new builder-style object to manufacture [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
302 + | pub fn builder() -> crate::input::operation_with_nested_structure_input::Builder {
|
303 + | crate::input::operation_with_nested_structure_input::Builder::default()
|
304 + | }
|
305 + | }
|
306 + | impl crate::constrained::Constrained for crate::input::OperationWithNestedStructureInput {
|
307 + | type Unconstrained = crate::input::operation_with_nested_structure_input::Builder;
|
310 308 | }
|
311 309 |
|
312 310 | #[allow(missing_docs)] // documentation missing in model
|
313 311 | #[derive(
|
314 312 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
315 313 | )]
|
316 - | pub struct NoInputAndOutputInput {}
|
317 - | impl NoInputAndOutputInput {
|
318 - | /// Creates a new builder-style object to manufacture [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
319 - | pub fn builder() -> crate::input::no_input_and_output_input::Builder {
|
320 - | crate::input::no_input_and_output_input::Builder::default()
|
314 + | pub struct OperationWithRequiredMembersWithDefaultsInput {}
|
315 + | impl OperationWithRequiredMembersWithDefaultsInput {
|
316 + | /// Creates a new builder-style object to manufacture [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
317 + | pub fn builder() -> crate::input::operation_with_required_members_with_defaults_input::Builder {
|
318 + | crate::input::operation_with_required_members_with_defaults_input::Builder::default()
|
321 319 | }
|
322 320 | }
|
323 - | impl crate::constrained::Constrained for crate::input::NoInputAndOutputInput {
|
324 - | type Unconstrained = crate::input::no_input_and_output_input::Builder;
|
321 + | impl crate::constrained::Constrained
|
322 + | for crate::input::OperationWithRequiredMembersWithDefaultsInput
|
323 + | {
|
324 + | type Unconstrained = crate::input::operation_with_required_members_with_defaults_input::Builder;
|
325 325 | }
|
326 326 |
|
327 327 | #[allow(missing_docs)] // documentation missing in model
|
328 328 | #[derive(
|
329 329 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
330 330 | )]
|
331 - | pub struct NoInputAndNoOutputInput {}
|
332 - | impl NoInputAndNoOutputInput {
|
333 - | /// Creates a new builder-style object to manufacture [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
334 - | pub fn builder() -> crate::input::no_input_and_no_output_input::Builder {
|
335 - | crate::input::no_input_and_no_output_input::Builder::default()
|
331 + | pub struct QueryIncompatibleOperationInput {}
|
332 + | impl QueryIncompatibleOperationInput {
|
333 + | /// Creates a new builder-style object to manufacture [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
334 + | pub fn builder() -> crate::input::query_incompatible_operation_input::Builder {
|
335 + | crate::input::query_incompatible_operation_input::Builder::default()
|
336 336 | }
|
337 337 | }
|
338 - | impl crate::constrained::Constrained for crate::input::NoInputAndNoOutputInput {
|
339 - | type Unconstrained = crate::input::no_input_and_no_output_input::Builder;
|
338 + | impl crate::constrained::Constrained for crate::input::QueryIncompatibleOperationInput {
|
339 + | type Unconstrained = crate::input::query_incompatible_operation_input::Builder;
|
340 340 | }
|
341 - | /// See [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
342 - | pub mod query_incompatible_operation_input {
|
341 + | /// See [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
342 + | pub mod no_input_and_no_output_input {
|
343 343 |
|
344 - | impl ::std::convert::From<Builder> for crate::input::QueryIncompatibleOperationInput {
|
344 + | impl ::std::convert::From<Builder> for crate::input::NoInputAndNoOutputInput {
|
345 345 | fn from(builder: Builder) -> Self {
|
346 346 | builder.build()
|
347 347 | }
|
348 348 | }
|
349 - | /// A builder for [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
349 + | /// A builder for [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
350 350 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
351 351 | pub struct Builder {}
|
352 352 | impl Builder {
|
353 - | /// Consumes the builder and constructs a [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
354 - | pub fn build(self) -> crate::input::QueryIncompatibleOperationInput {
|
353 + | /// Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
354 + | pub fn build(self) -> crate::input::NoInputAndNoOutputInput {
|
355 355 | self.build_enforcing_all_constraints()
|
356 356 | }
|
357 - | fn build_enforcing_all_constraints(self) -> crate::input::QueryIncompatibleOperationInput {
|
358 - | crate::input::QueryIncompatibleOperationInput {}
|
357 + | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndNoOutputInput {
|
358 + | crate::input::NoInputAndNoOutputInput {}
|
359 359 | }
|
360 360 | }
|
361 361 | }
|
362 - | /// See [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
363 - | pub mod operation_with_required_members_with_defaults_input {
|
362 + | /// See [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
363 + | pub mod no_input_and_output_input {
|
364 364 |
|
365 - | impl ::std::convert::From<Builder> for crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
365 + | impl ::std::convert::From<Builder> for crate::input::NoInputAndOutputInput {
|
366 366 | fn from(builder: Builder) -> Self {
|
367 367 | builder.build()
|
368 368 | }
|
369 369 | }
|
370 - | /// A builder for [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
370 + | /// A builder for [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
371 371 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
372 372 | pub struct Builder {}
|
373 373 | impl Builder {
|
374 - | /// Consumes the builder and constructs a [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
375 - | pub fn build(self) -> crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
374 + | /// Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
375 + | pub fn build(self) -> crate::input::NoInputAndOutputInput {
|
376 376 | self.build_enforcing_all_constraints()
|
377 377 | }
|
378 - | fn build_enforcing_all_constraints(
|
379 - | self,
|
380 - | ) -> crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
381 - | crate::input::OperationWithRequiredMembersWithDefaultsInput {}
|
378 + | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndOutputInput {
|
379 + | crate::input::NoInputAndOutputInput {}
|
382 380 | }
|
383 381 | }
|
384 382 | }
|
385 - | /// See [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
386 - | pub mod operation_with_nested_structure_input {
|
383 + | /// See [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
384 + | pub mod empty_input_and_empty_output_input {
|
385 + |
|
386 + | impl ::std::convert::From<Builder> for crate::input::EmptyInputAndEmptyOutputInput {
|
387 + | fn from(builder: Builder) -> Self {
|
388 + | builder.build()
|
389 + | }
|
390 + | }
|
391 + | /// A builder for [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
392 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
393 + | pub struct Builder {}
|
394 + | impl Builder {
|
395 + | /// Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
396 + | pub fn build(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
397 + | self.build_enforcing_all_constraints()
|
398 + | }
|
399 + | fn build_enforcing_all_constraints(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
400 + | crate::input::EmptyInputAndEmptyOutputInput {}
|
401 + | }
|
402 + | }
|
403 + | }
|
404 + | /// See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
405 + | pub mod simple_scalar_properties_input {
|
406 + |
|
407 + | impl ::std::convert::From<Builder> for crate::input::SimpleScalarPropertiesInput {
|
408 + | fn from(builder: Builder) -> Self {
|
409 + | builder.build()
|
410 + | }
|
411 + | }
|
412 + | /// A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
413 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
414 + | pub struct Builder {
|
415 + | pub(crate) float_value: ::std::option::Option<f32>,
|
416 + | pub(crate) double_value: ::std::option::Option<f64>,
|
417 + | }
|
418 + | impl Builder {
|
419 + | #[allow(missing_docs)] // documentation missing in model
|
420 + | pub fn float_value(mut self, input: ::std::option::Option<f32>) -> Self {
|
421 + | self.float_value = input;
|
422 + | self
|
423 + | }
|
424 + | #[allow(missing_docs)] // documentation missing in model
|
425 + | pub(crate) fn set_float_value(
|
426 + | mut self,
|
427 + | input: Option<impl ::std::convert::Into<f32>>,
|
428 + | ) -> Self {
|
429 + | self.float_value = input.map(|v| v.into());
|
430 + | self
|
431 + | }
|
432 + | #[allow(missing_docs)] // documentation missing in model
|
433 + | pub fn double_value(mut self, input: ::std::option::Option<f64>) -> Self {
|
434 + | self.double_value = input;
|
435 + | self
|
436 + | }
|
437 + | #[allow(missing_docs)] // documentation missing in model
|
438 + | pub(crate) fn set_double_value(
|
439 + | mut self,
|
440 + | input: Option<impl ::std::convert::Into<f64>>,
|
441 + | ) -> Self {
|
442 + | self.double_value = input.map(|v| v.into());
|
443 + | self
|
444 + | }
|
445 + | /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
446 + | pub fn build(self) -> crate::input::SimpleScalarPropertiesInput {
|
447 + | self.build_enforcing_all_constraints()
|
448 + | }
|
449 + | fn build_enforcing_all_constraints(self) -> crate::input::SimpleScalarPropertiesInput {
|
450 + | crate::input::SimpleScalarPropertiesInput {
|
451 + | float_value: self.float_value,
|
452 + | double_value: self.double_value,
|
453 + | }
|
454 + | }
|
455 + | }
|
456 + | }
|
457 + | /// See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
458 + | pub mod greeting_with_errors_input {
|
459 + |
|
460 + | impl ::std::convert::From<Builder> for crate::input::GreetingWithErrorsInput {
|
461 + | fn from(builder: Builder) -> Self {
|
462 + | builder.build()
|
463 + | }
|
464 + | }
|
465 + | /// A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
466 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
467 + | pub struct Builder {
|
468 + | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
469 + | }
|
470 + | impl Builder {
|
471 + | #[allow(missing_docs)] // documentation missing in model
|
472 + | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
473 + | self.greeting = input;
|
474 + | self
|
475 + | }
|
476 + | #[allow(missing_docs)] // documentation missing in model
|
477 + | pub(crate) fn set_greeting(
|
478 + | mut self,
|
479 + | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
480 + | ) -> Self {
|
481 + | self.greeting = input.map(|v| v.into());
|
482 + | self
|
483 + | }
|
484 + | /// Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
485 + | pub fn build(self) -> crate::input::GreetingWithErrorsInput {
|
486 + | self.build_enforcing_all_constraints()
|
487 + | }
|
488 + | fn build_enforcing_all_constraints(self) -> crate::input::GreetingWithErrorsInput {
|
489 + | crate::input::GreetingWithErrorsInput {
|
490 + | greeting: self.greeting,
|
491 + | }
|
492 + | }
|
493 + | }
|
494 + | }
|
495 + | /// See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
496 + | pub mod json_unions_input {
|
387 497 |
|
388 498 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
389 499 | /// Holds one variant for each of the ways the builder can fail.
|
390 500 | #[non_exhaustive]
|
391 501 | #[allow(clippy::enum_variant_names)]
|
392 502 | pub enum ConstraintViolation {
|
393 - | /// `top_level` was not provided but it is required when building `OperationWithNestedStructureInput`.
|
394 - | MissingTopLevel,
|
395 - | /// Constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`.
|
503 + | /// Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
396 504 | #[doc(hidden)]
|
397 - | TopLevel(crate::model::top_level::ConstraintViolation),
|
505 + | Contents(crate::model::my_union::ConstraintViolation),
|
398 506 | }
|
399 507 | impl ::std::fmt::Display for ConstraintViolation {
|
400 508 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
401 509 | match self {
|
402 - | ConstraintViolation::MissingTopLevel => write!(f, "`top_level` was not provided but it is required when building `OperationWithNestedStructureInput`"),
|
403 - | ConstraintViolation::TopLevel(_) => write!(f, "constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`"),
|
510 + | ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
404 511 | }
|
405 512 | }
|
406 513 | }
|
407 514 | impl ::std::error::Error for ConstraintViolation {}
|
408 515 | impl ConstraintViolation {
|
409 516 | pub(crate) fn as_validation_exception_field(
|
410 517 | self,
|
411 518 | path: ::std::string::String,
|
412 519 | ) -> crate::model::ValidationExceptionField {
|
413 520 | match self {
|
414 - | ConstraintViolation::MissingTopLevel => crate::model::ValidationExceptionField {
|
415 - | message: format!("Value at '{}/topLevel' failed to satisfy constraint: Member must not be null", path),
|
416 - | path: path + "/topLevel",
|
417 - | },
|
418 - | ConstraintViolation::TopLevel(inner) => inner.as_validation_exception_field(path + "/topLevel"),
|
419 - | }
|
521 + | ConstraintViolation::Contents(inner) => {
|
522 + | inner.as_validation_exception_field(path + "/contents")
|
523 + | }
|
524 + | }
|
420 525 | }
|
421 526 | }
|
422 527 | impl ::std::convert::From<ConstraintViolation>
|
423 528 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
424 529 | {
|
425 530 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
426 531 | let first_validation_exception_field =
|
427 532 | constraint_violation.as_validation_exception_field("".to_owned());
|
428 533 | let validation_exception = crate::error::ValidationException {
|
429 534 | message: format!(
|
430 535 | "1 validation error detected. {}",
|
431 536 | &first_validation_exception_field.message
|
432 537 | ),
|
433 538 | field_list: Some(vec![first_validation_exception_field]),
|
434 539 | };
|
435 540 | Self::ConstraintViolation(
|
436 541 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
437 542 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
438 543 | )
|
439 544 | }
|
440 545 | }
|
441 546 | impl ::std::convert::From<Builder>
|
442 - | for crate::constrained::MaybeConstrained<crate::input::OperationWithNestedStructureInput>
|
547 + | for crate::constrained::MaybeConstrained<crate::input::JsonUnionsInput>
|
443 548 | {
|
444 549 | fn from(builder: Builder) -> Self {
|
445 550 | Self::Unconstrained(builder)
|
446 551 | }
|
447 552 | }
|
448 - | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithNestedStructureInput {
|
553 + | impl ::std::convert::TryFrom<Builder> for crate::input::JsonUnionsInput {
|
449 554 | type Error = ConstraintViolation;
|
450 555 |
|
451 556 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
452 557 | builder.build()
|
453 558 | }
|
454 559 | }
|
455 - | /// A builder for [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
560 + | /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
456 561 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
457 562 | pub struct Builder {
|
458 - | pub(crate) top_level:
|
459 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TopLevel>>,
|
563 + | pub(crate) contents:
|
564 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
460 565 | }
|
461 566 | impl Builder {
|
462 - | #[allow(missing_docs)] // documentation missing in model
|
463 - | pub fn top_level(mut self, input: crate::model::TopLevel) -> Self {
|
464 - | self.top_level = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
567 + | /// A union with a representative set of types for members.
|
568 + | pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
|
569 + | self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
|
465 570 | self
|
466 571 | }
|
467 - | #[allow(missing_docs)] // documentation missing in model
|
468 - | pub(crate) fn set_top_level(
|
572 + | /// A union with a representative set of types for members.
|
573 + | pub(crate) fn set_contents(
|
469 574 | mut self,
|
470 - | input: impl ::std::convert::Into<
|
471 - | crate::constrained::MaybeConstrained<crate::model::TopLevel>,
|
575 + | input: Option<
|
576 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
472 577 | >,
|
473 578 | ) -> Self {
|
474 - | self.top_level = Some(input.into());
|
579 + | self.contents = input.map(|v| v.into());
|
475 580 | self
|
476 581 | }
|
477 - | /// Consumes the builder and constructs a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
582 + | /// Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
478 583 | ///
|
479 - | /// The builder fails to construct a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput) if a [`ConstraintViolation`] occurs.
|
584 + | /// The builder fails to construct a [`JsonUnionsInput`](crate::input::JsonUnionsInput) if a [`ConstraintViolation`] occurs.
|
480 585 | ///
|
481 - | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
482 - | pub fn build(
|
483 - | self,
|
484 - | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
586 + | pub fn build(self) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
485 587 | self.build_enforcing_all_constraints()
|
486 588 | }
|
487 589 | fn build_enforcing_all_constraints(
|
488 590 | self,
|
489 - | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
490 - | Ok(crate::input::OperationWithNestedStructureInput {
|
491 - | top_level: self
|
492 - | .top_level
|
591 + | ) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
592 + | Ok(crate::input::JsonUnionsInput {
|
593 + | contents: self
|
594 + | .contents
|
493 595 | .map(|v| match v {
|
494 596 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
495 597 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
496 598 | })
|
497 - | .map(|res| res.map_err(ConstraintViolation::TopLevel))
|
498 - | .transpose()?
|
499 - | .ok_or(ConstraintViolation::MissingTopLevel)?,
|
599 + | .map(|res| res.map_err(ConstraintViolation::Contents))
|
600 + | .transpose()?,
|
500 601 | })
|
501 602 | }
|
502 603 | }
|
503 604 | }
|
504 - | /// See [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
505 - | pub mod operation_with_required_members_input {
|
605 + | /// See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
606 + | pub mod endpoint_operation_input {
|
506 607 |
|
507 - | impl ::std::convert::From<Builder> for crate::input::OperationWithRequiredMembersInput {
|
608 + | impl ::std::convert::From<Builder> for crate::input::EndpointOperationInput {
|
508 609 | fn from(builder: Builder) -> Self {
|
509 610 | builder.build()
|
510 611 | }
|
511 612 | }
|
512 - | /// A builder for [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
613 + | /// A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
513 614 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
514 615 | pub struct Builder {}
|
515 616 | impl Builder {
|
516 - | /// Consumes the builder and constructs a [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
517 - | pub fn build(self) -> crate::input::OperationWithRequiredMembersInput {
|
617 + | /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
618 + | pub fn build(self) -> crate::input::EndpointOperationInput {
|
518 619 | self.build_enforcing_all_constraints()
|
519 620 | }
|
520 - | fn build_enforcing_all_constraints(
|
521 - | self,
|
522 - | ) -> crate::input::OperationWithRequiredMembersInput {
|
523 - | crate::input::OperationWithRequiredMembersInput {}
|
621 + | fn build_enforcing_all_constraints(self) -> crate::input::EndpointOperationInput {
|
622 + | crate::input::EndpointOperationInput {}
|
524 623 | }
|
525 624 | }
|
526 625 | }
|
527 - | /// See [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
528 - | pub mod operation_with_defaults_input {
|
626 + | /// See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
627 + | pub mod endpoint_with_host_label_operation_input {
|
529 628 |
|
530 629 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
531 630 | /// Holds one variant for each of the ways the builder can fail.
|
532 631 | #[non_exhaustive]
|
533 632 | #[allow(clippy::enum_variant_names)]
|
534 633 | pub enum ConstraintViolation {
|
535 - | /// Constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`.
|
536 - | #[doc(hidden)]
|
537 - | Defaults(crate::model::defaults::ConstraintViolation),
|
634 + | /// `label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
635 + | MissingLabel,
|
538 636 | }
|
539 637 | impl ::std::fmt::Display for ConstraintViolation {
|
540 638 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
541 639 | match self {
|
542 - | ConstraintViolation::Defaults(_) => write!(f, "constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`"),
|
640 + | ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
543 641 | }
|
544 642 | }
|
545 643 | }
|
546 644 | impl ::std::error::Error for ConstraintViolation {}
|
547 645 | impl ConstraintViolation {
|
548 646 | pub(crate) fn as_validation_exception_field(
|
549 647 | self,
|
550 648 | path: ::std::string::String,
|
551 649 | ) -> crate::model::ValidationExceptionField {
|
552 650 | match self {
|
553 - | ConstraintViolation::Defaults(inner) => {
|
554 - | inner.as_validation_exception_field(path + "/defaults")
|
555 - | }
|
651 + | ConstraintViolation::MissingLabel => crate::model::ValidationExceptionField {
|
652 + | message: format!(
|
653 + | "Value at '{}/label' failed to satisfy constraint: Member must not be null",
|
654 + | path
|
655 + | ),
|
656 + | path: path + "/label",
|
657 + | },
|
556 658 | }
|
557 659 | }
|
558 660 | }
|
559 661 | impl ::std::convert::From<ConstraintViolation>
|
560 662 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
561 663 | {
|
562 664 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
563 665 | let first_validation_exception_field =
|
564 666 | constraint_violation.as_validation_exception_field("".to_owned());
|
565 667 | let validation_exception = crate::error::ValidationException {
|
566 668 | message: format!(
|
567 669 | "1 validation error detected. {}",
|
568 670 | &first_validation_exception_field.message
|
569 671 | ),
|
570 672 | field_list: Some(vec![first_validation_exception_field]),
|
571 673 | };
|
572 674 | Self::ConstraintViolation(
|
573 675 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
574 676 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
575 677 | )
|
576 678 | }
|
577 679 | }
|
578 680 | impl ::std::convert::From<Builder>
|
579 - | for crate::constrained::MaybeConstrained<crate::input::OperationWithDefaultsInput>
|
681 + | for crate::constrained::MaybeConstrained<crate::input::EndpointWithHostLabelOperationInput>
|
580 682 | {
|
581 683 | fn from(builder: Builder) -> Self {
|
582 684 | Self::Unconstrained(builder)
|
583 685 | }
|
584 686 | }
|
585 - | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithDefaultsInput {
|
687 + | impl ::std::convert::TryFrom<Builder> for crate::input::EndpointWithHostLabelOperationInput {
|
586 688 | type Error = ConstraintViolation;
|
587 689 |
|
588 690 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
589 691 | builder.build()
|
590 692 | }
|
591 693 | }
|
592 - | /// A builder for [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
694 + | /// A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
593 695 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
594 696 | pub struct Builder {
|
595 - | pub(crate) defaults:
|
596 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
597 - | pub(crate) client_optional_defaults:
|
598 - | ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
599 - | pub(crate) top_level_default: ::std::option::Option<::std::string::String>,
|
600 - | pub(crate) other_top_level_default: ::std::option::Option<i32>,
|
697 + | pub(crate) label: ::std::option::Option<::std::string::String>,
|
601 698 | }
|
602 699 | impl Builder {
|
603 700 | #[allow(missing_docs)] // documentation missing in model
|
604 - | pub fn defaults(mut self, input: ::std::option::Option<crate::model::Defaults>) -> Self {
|
605 - | self.defaults = input.map(crate::constrained::MaybeConstrained::Constrained);
|
606 - | self
|
607 - | }
|
608 - | #[allow(missing_docs)] // documentation missing in model
|
609 - | pub(crate) fn set_defaults(
|
610 - | mut self,
|
611 - | input: Option<
|
612 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
613 - | >,
|
614 - | ) -> Self {
|
615 - | self.defaults = input.map(|v| v.into());
|
616 - | self
|
617 - | }
|
618 - | #[allow(missing_docs)] // documentation missing in model
|
619 - | pub fn client_optional_defaults(
|
620 - | mut self,
|
621 - | input: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
622 - | ) -> Self {
|
623 - | self.client_optional_defaults = input;
|
624 - | self
|
625 - | }
|
626 - | #[allow(missing_docs)] // documentation missing in model
|
627 - | pub(crate) fn set_client_optional_defaults(
|
628 - | mut self,
|
629 - | input: Option<impl ::std::convert::Into<crate::model::ClientOptionalDefaults>>,
|
630 - | ) -> Self {
|
631 - | self.client_optional_defaults = input.map(|v| v.into());
|
632 - | self
|
633 - | }
|
634 - | #[allow(missing_docs)] // documentation missing in model
|
635 - | pub fn top_level_default(mut self, input: ::std::string::String) -> Self {
|
636 - | self.top_level_default = Some(input);
|
701 + | pub fn label(mut self, input: ::std::string::String) -> Self {
|
702 + | self.label = Some(input);
|
637 703 | self
|
638 704 | }
|
639 705 | #[allow(missing_docs)] // documentation missing in model
|
640 - | pub(crate) fn set_top_level_default(
|
706 + | pub(crate) fn set_label(
|
641 707 | mut self,
|
642 708 | input: impl ::std::convert::Into<::std::string::String>,
|
643 709 | ) -> Self {
|
644 - | self.top_level_default = Some(input.into());
|
645 - | self
|
646 - | }
|
647 - | #[allow(missing_docs)] // documentation missing in model
|
648 - | pub fn other_top_level_default(mut self, input: i32) -> Self {
|
649 - | self.other_top_level_default = Some(input);
|
650 - | self
|
651 - | }
|
652 - | #[allow(missing_docs)] // documentation missing in model
|
653 - | pub(crate) fn set_other_top_level_default(
|
654 - | mut self,
|
655 - | input: impl ::std::convert::Into<i32>,
|
656 - | ) -> Self {
|
657 - | self.other_top_level_default = Some(input.into());
|
710 + | self.label = Some(input.into());
|
658 711 | self
|
659 712 | }
|
660 - | /// Consumes the builder and constructs a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
713 + | /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
661 714 | ///
|
662 - | /// The builder fails to construct a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput) if a [`ConstraintViolation`] occurs.
|
715 + | /// The builder fails to construct a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) if a [`ConstraintViolation`] occurs.
|
663 716 | ///
|
664 717 | pub fn build(
|
665 718 | self,
|
666 - | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
719 + | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
720 + | {
|
667 721 | self.build_enforcing_all_constraints()
|
668 722 | }
|
669 723 | fn build_enforcing_all_constraints(
|
670 724 | self,
|
671 - | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
672 - | Ok(crate::input::OperationWithDefaultsInput {
|
673 - | defaults: self
|
674 - | .defaults
|
675 - | .map(|v| match v {
|
676 - | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
677 - | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
678 - | })
|
679 - | .map(|res| res.map_err(ConstraintViolation::Defaults))
|
680 - | .transpose()?,
|
681 - | client_optional_defaults: self.client_optional_defaults,
|
682 - | top_level_default: self.top_level_default.unwrap_or_else(|| String::from("hi")),
|
683 - | other_top_level_default: self.other_top_level_default.unwrap_or(0i32),
|
725 + | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
726 + | {
|
727 + | Ok(crate::input::EndpointWithHostLabelOperationInput {
|
728 + | label: self.label.ok_or(ConstraintViolation::MissingLabel)?,
|
684 729 | })
|
685 730 | }
|
686 731 | }
|
687 732 | }
|
688 - | /// See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
689 - | pub mod content_type_parameters_input {
|
733 + | /// See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
734 + | pub mod host_with_path_operation_input {
|
690 735 |
|
691 - | impl ::std::convert::From<Builder> for crate::input::ContentTypeParametersInput {
|
736 + | impl ::std::convert::From<Builder> for crate::input::HostWithPathOperationInput {
|
692 737 | fn from(builder: Builder) -> Self {
|
693 738 | builder.build()
|
694 739 | }
|
695 740 | }
|
696 - | /// A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
741 + | /// A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
697 742 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
698 - | pub struct Builder {
|
699 - | pub(crate) value: ::std::option::Option<i32>,
|
700 - | }
|
743 + | pub struct Builder {}
|
701 744 | impl Builder {
|
702 - | #[allow(missing_docs)] // documentation missing in model
|
703 - | pub fn value(mut self, input: ::std::option::Option<i32>) -> Self {
|
704 - | self.value = input;
|
705 - | self
|
706 - | }
|
707 - | #[allow(missing_docs)] // documentation missing in model
|
708 - | pub(crate) fn set_value(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
709 - | self.value = input.map(|v| v.into());
|
710 - | self
|
711 - | }
|
712 - | /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
713 - | pub fn build(self) -> crate::input::ContentTypeParametersInput {
|
745 + | /// Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
746 + | pub fn build(self) -> crate::input::HostWithPathOperationInput {
|
714 747 | self.build_enforcing_all_constraints()
|
715 748 | }
|
716 - | fn build_enforcing_all_constraints(self) -> crate::input::ContentTypeParametersInput {
|
717 - | crate::input::ContentTypeParametersInput { value: self.value }
|
749 + | fn build_enforcing_all_constraints(self) -> crate::input::HostWithPathOperationInput {
|
750 + | crate::input::HostWithPathOperationInput {}
|
718 751 | }
|
719 752 | }
|
720 753 | }
|
721 754 | /// See [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
722 755 | pub mod put_with_content_encoding_input {
|
723 756 |
|
724 757 | impl ::std::convert::From<Builder> for crate::input::PutWithContentEncodingInput {
|
725 758 | fn from(builder: Builder) -> Self {
|
726 759 | builder.build()
|
727 760 | }
|
728 761 | }
|
729 762 | /// A builder for [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
730 763 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
731 764 | pub struct Builder {
|
732 765 | pub(crate) encoding: ::std::option::Option<::std::string::String>,
|
733 766 | pub(crate) data: ::std::option::Option<::std::string::String>,
|
734 767 | }
|
735 768 | impl Builder {
|
736 769 | #[allow(missing_docs)] // documentation missing in model
|
737 770 | pub fn encoding(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
738 771 | self.encoding = input;
|
739 772 | self
|
740 773 | }
|
741 774 | #[allow(missing_docs)] // documentation missing in model
|
742 775 | pub(crate) fn set_encoding(
|
743 776 | mut self,
|
744 777 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
745 778 | ) -> Self {
|
746 779 | self.encoding = input.map(|v| v.into());
|
747 780 | self
|
748 781 | }
|
749 782 | #[allow(missing_docs)] // documentation missing in model
|
750 783 | pub fn data(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
751 784 | self.data = input;
|
752 785 | self
|
753 786 | }
|
754 787 | #[allow(missing_docs)] // documentation missing in model
|
755 788 | pub(crate) fn set_data(
|
756 789 | mut self,
|
757 790 | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
758 791 | ) -> Self {
|
759 792 | self.data = input.map(|v| v.into());
|
760 793 | self
|
761 794 | }
|
762 795 | /// Consumes the builder and constructs a [`PutWithContentEncodingInput`](crate::input::PutWithContentEncodingInput).
|
763 796 | pub fn build(self) -> crate::input::PutWithContentEncodingInput {
|
764 797 | self.build_enforcing_all_constraints()
|
765 798 | }
|
766 799 | fn build_enforcing_all_constraints(self) -> crate::input::PutWithContentEncodingInput {
|
767 800 | crate::input::PutWithContentEncodingInput {
|
768 801 | encoding: self.encoding,
|
769 802 | data: self.data,
|
770 803 | }
|
771 804 | }
|
772 805 | }
|
773 806 | }
|
774 - | /// See [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
775 - | pub mod host_with_path_operation_input {
|
807 + | /// See [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
808 + | pub mod content_type_parameters_input {
|
776 809 |
|
777 - | impl ::std::convert::From<Builder> for crate::input::HostWithPathOperationInput {
|
810 + | impl ::std::convert::From<Builder> for crate::input::ContentTypeParametersInput {
|
778 811 | fn from(builder: Builder) -> Self {
|
779 812 | builder.build()
|
780 813 | }
|
781 814 | }
|
782 - | /// A builder for [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
815 + | /// A builder for [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
783 816 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
784 - | pub struct Builder {}
|
817 + | pub struct Builder {
|
818 + | pub(crate) value: ::std::option::Option<i32>,
|
819 + | }
|
785 820 | impl Builder {
|
786 - | /// Consumes the builder and constructs a [`HostWithPathOperationInput`](crate::input::HostWithPathOperationInput).
|
787 - | pub fn build(self) -> crate::input::HostWithPathOperationInput {
|
821 + | #[allow(missing_docs)] // documentation missing in model
|
822 + | pub fn value(mut self, input: ::std::option::Option<i32>) -> Self {
|
823 + | self.value = input;
|
824 + | self
|
825 + | }
|
826 + | #[allow(missing_docs)] // documentation missing in model
|
827 + | pub(crate) fn set_value(mut self, input: Option<impl ::std::convert::Into<i32>>) -> Self {
|
828 + | self.value = input.map(|v| v.into());
|
829 + | self
|
830 + | }
|
831 + | /// Consumes the builder and constructs a [`ContentTypeParametersInput`](crate::input::ContentTypeParametersInput).
|
832 + | pub fn build(self) -> crate::input::ContentTypeParametersInput {
|
788 833 | self.build_enforcing_all_constraints()
|
789 834 | }
|
790 - | fn build_enforcing_all_constraints(self) -> crate::input::HostWithPathOperationInput {
|
791 - | crate::input::HostWithPathOperationInput {}
|
835 + | fn build_enforcing_all_constraints(self) -> crate::input::ContentTypeParametersInput {
|
836 + | crate::input::ContentTypeParametersInput { value: self.value }
|
792 837 | }
|
793 838 | }
|
794 839 | }
|
795 - | /// See [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
796 - | pub mod endpoint_with_host_label_operation_input {
|
840 + | /// See [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
841 + | pub mod operation_with_defaults_input {
|
797 842 |
|
798 843 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
799 844 | /// Holds one variant for each of the ways the builder can fail.
|
800 845 | #[non_exhaustive]
|
801 846 | #[allow(clippy::enum_variant_names)]
|
802 847 | pub enum ConstraintViolation {
|
803 - | /// `label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`.
|
804 - | MissingLabel,
|
848 + | /// Constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`.
|
849 + | #[doc(hidden)]
|
850 + | Defaults(crate::model::defaults::ConstraintViolation),
|
805 851 | }
|
806 852 | impl ::std::fmt::Display for ConstraintViolation {
|
807 853 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
808 854 | match self {
|
809 - | ConstraintViolation::MissingLabel => write!(f, "`label` was not provided but it is required when building `EndpointWithHostLabelOperationInput`"),
|
855 + | ConstraintViolation::Defaults(_) => write!(f, "constraint violation occurred building member `defaults` when building `OperationWithDefaultsInput`"),
|
810 856 | }
|
811 857 | }
|
812 858 | }
|
813 859 | impl ::std::error::Error for ConstraintViolation {}
|
814 860 | impl ConstraintViolation {
|
815 861 | pub(crate) fn as_validation_exception_field(
|
816 862 | self,
|
817 863 | path: ::std::string::String,
|
818 864 | ) -> crate::model::ValidationExceptionField {
|
819 865 | match self {
|
820 - | ConstraintViolation::MissingLabel => crate::model::ValidationExceptionField {
|
821 - | message: format!(
|
822 - | "Value at '{}/label' failed to satisfy constraint: Member must not be null",
|
823 - | path
|
824 - | ),
|
825 - | path: path + "/label",
|
826 - | },
|
866 + | ConstraintViolation::Defaults(inner) => {
|
867 + | inner.as_validation_exception_field(path + "/defaults")
|
868 + | }
|
827 869 | }
|
828 870 | }
|
829 871 | }
|
830 872 | impl ::std::convert::From<ConstraintViolation>
|
831 873 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
832 874 | {
|
833 875 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
834 876 | let first_validation_exception_field =
|
835 877 | constraint_violation.as_validation_exception_field("".to_owned());
|
836 878 | let validation_exception = crate::error::ValidationException {
|
837 879 | message: format!(
|
838 880 | "1 validation error detected. {}",
|
839 881 | &first_validation_exception_field.message
|
840 882 | ),
|
841 883 | field_list: Some(vec![first_validation_exception_field]),
|
842 884 | };
|
843 885 | Self::ConstraintViolation(
|
844 886 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
845 887 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
846 888 | )
|
847 889 | }
|
848 890 | }
|
849 891 | impl ::std::convert::From<Builder>
|
850 - | for crate::constrained::MaybeConstrained<crate::input::EndpointWithHostLabelOperationInput>
|
892 + | for crate::constrained::MaybeConstrained<crate::input::OperationWithDefaultsInput>
|
851 893 | {
|
852 894 | fn from(builder: Builder) -> Self {
|
853 895 | Self::Unconstrained(builder)
|
854 896 | }
|
855 897 | }
|
856 - | impl ::std::convert::TryFrom<Builder> for crate::input::EndpointWithHostLabelOperationInput {
|
898 + | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithDefaultsInput {
|
857 899 | type Error = ConstraintViolation;
|
858 900 |
|
859 901 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
860 902 | builder.build()
|
861 903 | }
|
862 904 | }
|
863 - | /// A builder for [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
905 + | /// A builder for [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
864 906 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
865 907 | pub struct Builder {
|
866 - | pub(crate) label: ::std::option::Option<::std::string::String>,
|
908 + | pub(crate) defaults:
|
909 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
910 + | pub(crate) client_optional_defaults:
|
911 + | ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
912 + | pub(crate) top_level_default: ::std::option::Option<::std::string::String>,
|
913 + | pub(crate) other_top_level_default: ::std::option::Option<i32>,
|
867 914 | }
|
868 915 | impl Builder {
|
869 916 | #[allow(missing_docs)] // documentation missing in model
|
870 - | pub fn label(mut self, input: ::std::string::String) -> Self {
|
871 - | self.label = Some(input);
|
917 + | pub fn defaults(mut self, input: ::std::option::Option<crate::model::Defaults>) -> Self {
|
918 + | self.defaults = input.map(crate::constrained::MaybeConstrained::Constrained);
|
872 919 | self
|
873 920 | }
|
874 921 | #[allow(missing_docs)] // documentation missing in model
|
875 - | pub(crate) fn set_label(
|
922 + | pub(crate) fn set_defaults(
|
923 + | mut self,
|
924 + | input: Option<
|
925 + | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::Defaults>>,
|
926 + | >,
|
927 + | ) -> Self {
|
928 + | self.defaults = input.map(|v| v.into());
|
929 + | self
|
930 + | }
|
931 + | #[allow(missing_docs)] // documentation missing in model
|
932 + | pub fn client_optional_defaults(
|
933 + | mut self,
|
934 + | input: ::std::option::Option<crate::model::ClientOptionalDefaults>,
|
935 + | ) -> Self {
|
936 + | self.client_optional_defaults = input;
|
937 + | self
|
938 + | }
|
939 + | #[allow(missing_docs)] // documentation missing in model
|
940 + | pub(crate) fn set_client_optional_defaults(
|
941 + | mut self,
|
942 + | input: Option<impl ::std::convert::Into<crate::model::ClientOptionalDefaults>>,
|
943 + | ) -> Self {
|
944 + | self.client_optional_defaults = input.map(|v| v.into());
|
945 + | self
|
946 + | }
|
947 + | #[allow(missing_docs)] // documentation missing in model
|
948 + | pub fn top_level_default(mut self, input: ::std::string::String) -> Self {
|
949 + | self.top_level_default = Some(input);
|
950 + | self
|
951 + | }
|
952 + | #[allow(missing_docs)] // documentation missing in model
|
953 + | pub(crate) fn set_top_level_default(
|
876 954 | mut self,
|
877 955 | input: impl ::std::convert::Into<::std::string::String>,
|
878 956 | ) -> Self {
|
879 - | self.label = Some(input.into());
|
957 + | self.top_level_default = Some(input.into());
|
880 958 | self
|
881 959 | }
|
882 - | /// Consumes the builder and constructs a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput).
|
960 + | #[allow(missing_docs)] // documentation missing in model
|
961 + | pub fn other_top_level_default(mut self, input: i32) -> Self {
|
962 + | self.other_top_level_default = Some(input);
|
963 + | self
|
964 + | }
|
965 + | #[allow(missing_docs)] // documentation missing in model
|
966 + | pub(crate) fn set_other_top_level_default(
|
967 + | mut self,
|
968 + | input: impl ::std::convert::Into<i32>,
|
969 + | ) -> Self {
|
970 + | self.other_top_level_default = Some(input.into());
|
971 + | self
|
972 + | }
|
973 + | /// Consumes the builder and constructs a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput).
|
883 974 | ///
|
884 - | /// The builder fails to construct a [`EndpointWithHostLabelOperationInput`](crate::input::EndpointWithHostLabelOperationInput) if a [`ConstraintViolation`] occurs.
|
975 + | /// The builder fails to construct a [`OperationWithDefaultsInput`](crate::input::OperationWithDefaultsInput) if a [`ConstraintViolation`] occurs.
|
885 976 | ///
|
886 977 | pub fn build(
|
887 978 | self,
|
888 - | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
889 - | {
|
979 + | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
890 980 | self.build_enforcing_all_constraints()
|
891 981 | }
|
892 982 | fn build_enforcing_all_constraints(
|
893 983 | self,
|
894 - | ) -> Result<crate::input::EndpointWithHostLabelOperationInput, ConstraintViolation>
|
895 - | {
|
896 - | Ok(crate::input::EndpointWithHostLabelOperationInput {
|
897 - | label: self.label.ok_or(ConstraintViolation::MissingLabel)?,
|
984 + | ) -> Result<crate::input::OperationWithDefaultsInput, ConstraintViolation> {
|
985 + | Ok(crate::input::OperationWithDefaultsInput {
|
986 + | defaults: self
|
987 + | .defaults
|
988 + | .map(|v| match v {
|
989 + | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
990 + | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
991 + | })
|
992 + | .map(|res| res.map_err(ConstraintViolation::Defaults))
|
993 + | .transpose()?,
|
994 + | client_optional_defaults: self.client_optional_defaults,
|
995 + | top_level_default: self.top_level_default.unwrap_or_else(|| String::from("hi")),
|
996 + | other_top_level_default: self.other_top_level_default.unwrap_or(0i32),
|
898 997 | })
|
899 998 | }
|
900 999 | }
|
901 1000 | }
|
902 - | /// See [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
903 - | pub mod endpoint_operation_input {
|
1001 + | /// See [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
1002 + | pub mod operation_with_required_members_input {
|
904 1003 |
|
905 - | impl ::std::convert::From<Builder> for crate::input::EndpointOperationInput {
|
1004 + | impl ::std::convert::From<Builder> for crate::input::OperationWithRequiredMembersInput {
|
906 1005 | fn from(builder: Builder) -> Self {
|
907 1006 | builder.build()
|
908 1007 | }
|
909 1008 | }
|
910 - | /// A builder for [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
1009 + | /// A builder for [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
911 1010 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
912 1011 | pub struct Builder {}
|
913 1012 | impl Builder {
|
914 - | /// Consumes the builder and constructs a [`EndpointOperationInput`](crate::input::EndpointOperationInput).
|
915 - | pub fn build(self) -> crate::input::EndpointOperationInput {
|
1013 + | /// Consumes the builder and constructs a [`OperationWithRequiredMembersInput`](crate::input::OperationWithRequiredMembersInput).
|
1014 + | pub fn build(self) -> crate::input::OperationWithRequiredMembersInput {
|
916 1015 | self.build_enforcing_all_constraints()
|
917 1016 | }
|
918 - | fn build_enforcing_all_constraints(self) -> crate::input::EndpointOperationInput {
|
919 - | crate::input::EndpointOperationInput {}
|
1017 + | fn build_enforcing_all_constraints(
|
1018 + | self,
|
1019 + | ) -> crate::input::OperationWithRequiredMembersInput {
|
1020 + | crate::input::OperationWithRequiredMembersInput {}
|
920 1021 | }
|
921 1022 | }
|
922 1023 | }
|
923 - | /// See [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
924 - | pub mod json_unions_input {
|
1024 + | /// See [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
1025 + | pub mod operation_with_nested_structure_input {
|
925 1026 |
|
926 1027 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
927 1028 | /// Holds one variant for each of the ways the builder can fail.
|
928 1029 | #[non_exhaustive]
|
929 1030 | #[allow(clippy::enum_variant_names)]
|
930 1031 | pub enum ConstraintViolation {
|
931 - | /// Constraint violation occurred building member `contents` when building `JsonUnionsInput`.
|
1032 + | /// `top_level` was not provided but it is required when building `OperationWithNestedStructureInput`.
|
1033 + | MissingTopLevel,
|
1034 + | /// Constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`.
|
932 1035 | #[doc(hidden)]
|
933 - | Contents(crate::model::my_union::ConstraintViolation),
|
1036 + | TopLevel(crate::model::top_level::ConstraintViolation),
|
934 1037 | }
|
935 1038 | impl ::std::fmt::Display for ConstraintViolation {
|
936 1039 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
937 1040 | match self {
|
938 - | ConstraintViolation::Contents(_) => write!(f, "constraint violation occurred building member `contents` when building `JsonUnionsInput`"),
|
1041 + | ConstraintViolation::MissingTopLevel => write!(f, "`top_level` was not provided but it is required when building `OperationWithNestedStructureInput`"),
|
1042 + | ConstraintViolation::TopLevel(_) => write!(f, "constraint violation occurred building member `top_level` when building `OperationWithNestedStructureInput`"),
|
939 1043 | }
|
940 1044 | }
|
941 1045 | }
|
942 1046 | impl ::std::error::Error for ConstraintViolation {}
|
943 1047 | impl ConstraintViolation {
|
944 1048 | pub(crate) fn as_validation_exception_field(
|
945 1049 | self,
|
946 1050 | path: ::std::string::String,
|
947 1051 | ) -> crate::model::ValidationExceptionField {
|
948 1052 | match self {
|
949 - | ConstraintViolation::Contents(inner) => {
|
950 - | inner.as_validation_exception_field(path + "/contents")
|
951 - | }
|
952 - | }
|
1053 + | ConstraintViolation::MissingTopLevel => crate::model::ValidationExceptionField {
|
1054 + | message: format!("Value at '{}/topLevel' failed to satisfy constraint: Member must not be null", path),
|
1055 + | path: path + "/topLevel",
|
1056 + | },
|
1057 + | ConstraintViolation::TopLevel(inner) => inner.as_validation_exception_field(path + "/topLevel"),
|
1058 + | }
|
953 1059 | }
|
954 1060 | }
|
955 1061 | impl ::std::convert::From<ConstraintViolation>
|
956 1062 | for ::aws_smithy_legacy_http_server::protocol::aws_json::rejection::RequestRejection
|
957 1063 | {
|
958 1064 | fn from(constraint_violation: ConstraintViolation) -> Self {
|
959 1065 | let first_validation_exception_field =
|
960 1066 | constraint_violation.as_validation_exception_field("".to_owned());
|
961 1067 | let validation_exception = crate::error::ValidationException {
|
962 1068 | message: format!(
|
963 1069 | "1 validation error detected. {}",
|
964 1070 | &first_validation_exception_field.message
|
965 1071 | ),
|
966 1072 | field_list: Some(vec![first_validation_exception_field]),
|
967 1073 | };
|
968 1074 | Self::ConstraintViolation(
|
969 1075 | crate::protocol_serde::shape_validation_exception::ser_validation_exception_error(&validation_exception)
|
970 1076 | .expect("validation exceptions should never fail to serialize; please file a bug report under https://github.com/smithy-lang/smithy-rs/issues")
|
971 1077 | )
|
972 1078 | }
|
973 1079 | }
|
974 1080 | impl ::std::convert::From<Builder>
|
975 - | for crate::constrained::MaybeConstrained<crate::input::JsonUnionsInput>
|
1081 + | for crate::constrained::MaybeConstrained<crate::input::OperationWithNestedStructureInput>
|
976 1082 | {
|
977 1083 | fn from(builder: Builder) -> Self {
|
978 1084 | Self::Unconstrained(builder)
|
979 1085 | }
|
980 1086 | }
|
981 - | impl ::std::convert::TryFrom<Builder> for crate::input::JsonUnionsInput {
|
1087 + | impl ::std::convert::TryFrom<Builder> for crate::input::OperationWithNestedStructureInput {
|
982 1088 | type Error = ConstraintViolation;
|
983 1089 |
|
984 1090 | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
985 1091 | builder.build()
|
986 1092 | }
|
987 1093 | }
|
988 - | /// A builder for [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1094 + | /// A builder for [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
989 1095 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
990 1096 | pub struct Builder {
|
991 - | pub(crate) contents:
|
992 - | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
1097 + | pub(crate) top_level:
|
1098 + | ::std::option::Option<crate::constrained::MaybeConstrained<crate::model::TopLevel>>,
|
993 1099 | }
|
994 1100 | impl Builder {
|
995 - | /// A union with a representative set of types for members.
|
996 - | pub fn contents(mut self, input: ::std::option::Option<crate::model::MyUnion>) -> Self {
|
997 - | self.contents = input.map(crate::constrained::MaybeConstrained::Constrained);
|
1101 + | #[allow(missing_docs)] // documentation missing in model
|
1102 + | pub fn top_level(mut self, input: crate::model::TopLevel) -> Self {
|
1103 + | self.top_level = Some(crate::constrained::MaybeConstrained::Constrained(input));
|
998 1104 | self
|
999 1105 | }
|
1000 - | /// A union with a representative set of types for members.
|
1001 - | pub(crate) fn set_contents(
|
1106 + | #[allow(missing_docs)] // documentation missing in model
|
1107 + | pub(crate) fn set_top_level(
|
1002 1108 | mut self,
|
1003 - | input: Option<
|
1004 - | impl ::std::convert::Into<crate::constrained::MaybeConstrained<crate::model::MyUnion>>,
|
1109 + | input: impl ::std::convert::Into<
|
1110 + | crate::constrained::MaybeConstrained<crate::model::TopLevel>,
|
1005 1111 | >,
|
1006 1112 | ) -> Self {
|
1007 - | self.contents = input.map(|v| v.into());
|
1113 + | self.top_level = Some(input.into());
|
1008 1114 | self
|
1009 1115 | }
|
1010 - | /// Consumes the builder and constructs a [`JsonUnionsInput`](crate::input::JsonUnionsInput).
|
1116 + | /// Consumes the builder and constructs a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput).
|
1011 1117 | ///
|
1012 - | /// The builder fails to construct a [`JsonUnionsInput`](crate::input::JsonUnionsInput) if a [`ConstraintViolation`] occurs.
|
1118 + | /// The builder fails to construct a [`OperationWithNestedStructureInput`](crate::input::OperationWithNestedStructureInput) if a [`ConstraintViolation`] occurs.
|
1013 1119 | ///
|
1014 - | pub fn build(self) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
1120 + | /// If the builder fails, it will return the _first_ encountered [`ConstraintViolation`].
|
1121 + | pub fn build(
|
1122 + | self,
|
1123 + | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
1015 1124 | self.build_enforcing_all_constraints()
|
1016 1125 | }
|
1017 1126 | fn build_enforcing_all_constraints(
|
1018 1127 | self,
|
1019 - | ) -> Result<crate::input::JsonUnionsInput, ConstraintViolation> {
|
1020 - | Ok(crate::input::JsonUnionsInput {
|
1021 - | contents: self
|
1022 - | .contents
|
1128 + | ) -> Result<crate::input::OperationWithNestedStructureInput, ConstraintViolation> {
|
1129 + | Ok(crate::input::OperationWithNestedStructureInput {
|
1130 + | top_level: self
|
1131 + | .top_level
|
1023 1132 | .map(|v| match v {
|
1024 1133 | crate::constrained::MaybeConstrained::Constrained(x) => Ok(x),
|
1025 1134 | crate::constrained::MaybeConstrained::Unconstrained(x) => x.try_into(),
|
1026 1135 | })
|
1027 - | .map(|res| res.map_err(ConstraintViolation::Contents))
|
1028 - | .transpose()?,
|
1136 + | .map(|res| res.map_err(ConstraintViolation::TopLevel))
|
1137 + | .transpose()?
|
1138 + | .ok_or(ConstraintViolation::MissingTopLevel)?,
|
1029 1139 | })
|
1030 1140 | }
|
1031 1141 | }
|
1032 1142 | }
|
1033 - | /// See [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1034 - | pub mod greeting_with_errors_input {
|
1035 - |
|
1036 - | impl ::std::convert::From<Builder> for crate::input::GreetingWithErrorsInput {
|
1037 - | fn from(builder: Builder) -> Self {
|
1038 - | builder.build()
|
1039 - | }
|
1040 - | }
|
1041 - | /// A builder for [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1042 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1043 - | pub struct Builder {
|
1044 - | pub(crate) greeting: ::std::option::Option<::std::string::String>,
|
1045 - | }
|
1046 - | impl Builder {
|
1047 - | #[allow(missing_docs)] // documentation missing in model
|
1048 - | pub fn greeting(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
1049 - | self.greeting = input;
|
1050 - | self
|
1051 - | }
|
1052 - | #[allow(missing_docs)] // documentation missing in model
|
1053 - | pub(crate) fn set_greeting(
|
1054 - | mut self,
|
1055 - | input: Option<impl ::std::convert::Into<::std::string::String>>,
|
1056 - | ) -> Self {
|
1057 - | self.greeting = input.map(|v| v.into());
|
1058 - | self
|
1059 - | }
|
1060 - | /// Consumes the builder and constructs a [`GreetingWithErrorsInput`](crate::input::GreetingWithErrorsInput).
|
1061 - | pub fn build(self) -> crate::input::GreetingWithErrorsInput {
|
1062 - | self.build_enforcing_all_constraints()
|
1063 - | }
|
1064 - | fn build_enforcing_all_constraints(self) -> crate::input::GreetingWithErrorsInput {
|
1065 - | crate::input::GreetingWithErrorsInput {
|
1066 - | greeting: self.greeting,
|
1067 - | }
|
1068 - | }
|
1069 - | }
|
1070 - | }
|
1071 - | /// See [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1072 - | pub mod simple_scalar_properties_input {
|
1073 - |
|
1074 - | impl ::std::convert::From<Builder> for crate::input::SimpleScalarPropertiesInput {
|
1075 - | fn from(builder: Builder) -> Self {
|
1076 - | builder.build()
|
1077 - | }
|
1078 - | }
|
1079 - | /// A builder for [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1080 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1081 - | pub struct Builder {
|
1082 - | pub(crate) float_value: ::std::option::Option<f32>,
|
1083 - | pub(crate) double_value: ::std::option::Option<f64>,
|
1084 - | }
|
1085 - | impl Builder {
|
1086 - | #[allow(missing_docs)] // documentation missing in model
|
1087 - | pub fn float_value(mut self, input: ::std::option::Option<f32>) -> Self {
|
1088 - | self.float_value = input;
|
1089 - | self
|
1090 - | }
|
1091 - | #[allow(missing_docs)] // documentation missing in model
|
1092 - | pub(crate) fn set_float_value(
|
1093 - | mut self,
|
1094 - | input: Option<impl ::std::convert::Into<f32>>,
|
1095 - | ) -> Self {
|
1096 - | self.float_value = input.map(|v| v.into());
|
1097 - | self
|
1098 - | }
|
1099 - | #[allow(missing_docs)] // documentation missing in model
|
1100 - | pub fn double_value(mut self, input: ::std::option::Option<f64>) -> Self {
|
1101 - | self.double_value = input;
|
1102 - | self
|
1103 - | }
|
1104 - | #[allow(missing_docs)] // documentation missing in model
|
1105 - | pub(crate) fn set_double_value(
|
1106 - | mut self,
|
1107 - | input: Option<impl ::std::convert::Into<f64>>,
|
1108 - | ) -> Self {
|
1109 - | self.double_value = input.map(|v| v.into());
|
1110 - | self
|
1111 - | }
|
1112 - | /// Consumes the builder and constructs a [`SimpleScalarPropertiesInput`](crate::input::SimpleScalarPropertiesInput).
|
1113 - | pub fn build(self) -> crate::input::SimpleScalarPropertiesInput {
|
1114 - | self.build_enforcing_all_constraints()
|
1115 - | }
|
1116 - | fn build_enforcing_all_constraints(self) -> crate::input::SimpleScalarPropertiesInput {
|
1117 - | crate::input::SimpleScalarPropertiesInput {
|
1118 - | float_value: self.float_value,
|
1119 - | double_value: self.double_value,
|
1120 - | }
|
1121 - | }
|
1122 - | }
|
1123 - | }
|
1124 - | /// See [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1125 - | pub mod empty_input_and_empty_output_input {
|
1126 - |
|
1127 - | impl ::std::convert::From<Builder> for crate::input::EmptyInputAndEmptyOutputInput {
|
1128 - | fn from(builder: Builder) -> Self {
|
1129 - | builder.build()
|
1130 - | }
|
1131 - | }
|
1132 - | /// A builder for [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1133 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1134 - | pub struct Builder {}
|
1135 - | impl Builder {
|
1136 - | /// Consumes the builder and constructs a [`EmptyInputAndEmptyOutputInput`](crate::input::EmptyInputAndEmptyOutputInput).
|
1137 - | pub fn build(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
1138 - | self.build_enforcing_all_constraints()
|
1139 - | }
|
1140 - | fn build_enforcing_all_constraints(self) -> crate::input::EmptyInputAndEmptyOutputInput {
|
1141 - | crate::input::EmptyInputAndEmptyOutputInput {}
|
1142 - | }
|
1143 - | }
|
1144 - | }
|
1145 - | /// See [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1146 - | pub mod no_input_and_output_input {
|
1143 + | /// See [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
1144 + | pub mod operation_with_required_members_with_defaults_input {
|
1147 1145 |
|
1148 - | impl ::std::convert::From<Builder> for crate::input::NoInputAndOutputInput {
|
1146 + | impl ::std::convert::From<Builder> for crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
1149 1147 | fn from(builder: Builder) -> Self {
|
1150 1148 | builder.build()
|
1151 1149 | }
|
1152 1150 | }
|
1153 - | /// A builder for [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1151 + | /// A builder for [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
1154 1152 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1155 1153 | pub struct Builder {}
|
1156 1154 | impl Builder {
|
1157 - | /// Consumes the builder and constructs a [`NoInputAndOutputInput`](crate::input::NoInputAndOutputInput).
|
1158 - | pub fn build(self) -> crate::input::NoInputAndOutputInput {
|
1155 + | /// Consumes the builder and constructs a [`OperationWithRequiredMembersWithDefaultsInput`](crate::input::OperationWithRequiredMembersWithDefaultsInput).
|
1156 + | pub fn build(self) -> crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
1159 1157 | self.build_enforcing_all_constraints()
|
1160 1158 | }
|
1161 - | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndOutputInput {
|
1162 - | crate::input::NoInputAndOutputInput {}
|
1159 + | fn build_enforcing_all_constraints(
|
1160 + | self,
|
1161 + | ) -> crate::input::OperationWithRequiredMembersWithDefaultsInput {
|
1162 + | crate::input::OperationWithRequiredMembersWithDefaultsInput {}
|
1163 1163 | }
|
1164 1164 | }
|
1165 1165 | }
|
1166 - | /// See [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1167 - | pub mod no_input_and_no_output_input {
|
1166 + | /// See [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
1167 + | pub mod query_incompatible_operation_input {
|
1168 1168 |
|
1169 - | impl ::std::convert::From<Builder> for crate::input::NoInputAndNoOutputInput {
|
1169 + | impl ::std::convert::From<Builder> for crate::input::QueryIncompatibleOperationInput {
|
1170 1170 | fn from(builder: Builder) -> Self {
|
1171 1171 | builder.build()
|
1172 1172 | }
|
1173 1173 | }
|
1174 - | /// A builder for [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1174 + | /// A builder for [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
1175 1175 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
1176 1176 | pub struct Builder {}
|
1177 1177 | impl Builder {
|
1178 - | /// Consumes the builder and constructs a [`NoInputAndNoOutputInput`](crate::input::NoInputAndNoOutputInput).
|
1179 - | pub fn build(self) -> crate::input::NoInputAndNoOutputInput {
|
1178 + | /// Consumes the builder and constructs a [`QueryIncompatibleOperationInput`](crate::input::QueryIncompatibleOperationInput).
|
1179 + | pub fn build(self) -> crate::input::QueryIncompatibleOperationInput {
|
1180 1180 | self.build_enforcing_all_constraints()
|
1181 1181 | }
|
1182 - | fn build_enforcing_all_constraints(self) -> crate::input::NoInputAndNoOutputInput {
|
1183 - | crate::input::NoInputAndNoOutputInput {}
|
1182 + | fn build_enforcing_all_constraints(self) -> crate::input::QueryIncompatibleOperationInput {
|
1183 + | crate::input::QueryIncompatibleOperationInput {}
|
1184 1184 | }
|
1185 1185 | }
|
1186 1186 | }
|