1 1 | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
4 + | pub enum AttemptCapturingPokemonEvent {
|
5 + | #[allow(missing_docs)] // documentation missing in model
|
6 + | Event(crate::model::CapturingEvent),
|
7 + | }
|
8 + | impl AttemptCapturingPokemonEvent {
|
9 + | #[allow(irrefutable_let_patterns)]
|
10 + | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
11 + | /// Returns `Err(&Self)` if it can't be converted.
|
12 + | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
|
13 + | if let AttemptCapturingPokemonEvent::Event(val) = &self {
|
14 + | ::std::result::Result::Ok(val)
|
15 + | } else {
|
16 + | ::std::result::Result::Err(self)
|
17 + | }
|
18 + | }
|
19 + | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
20 + | pub fn is_event(&self) -> bool {
|
21 + | self.as_event().is_ok()
|
22 + | }
|
23 + | }
|
24 + | #[pyo3::pyclass(name = "AttemptCapturingPokemonEvent")]
|
25 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
26 + | pub struct PyUnionMarkerAttemptCapturingPokemonEvent(pub AttemptCapturingPokemonEvent);
|
27 + | #[::pyo3::pymethods]
|
28 + | impl PyUnionMarkerAttemptCapturingPokemonEvent {
|
29 + | #[allow(irrefutable_let_patterns)]
|
30 + | #[staticmethod]
|
31 + | /// Creates a new union instance of [`Event`](crate::model::AttemptCapturingPokemonEvent::Event)
|
32 + | /// :param data pokemon_service_server_sdk.model.CapturingEvent:
|
33 + | /// :rtype AttemptCapturingPokemonEvent:
|
34 + | pub fn event(data: crate::model::CapturingEvent) -> Self {
|
35 + | Self(AttemptCapturingPokemonEvent::Event(data))
|
36 + | }
|
37 + | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
38 + | /// :rtype pokemon_service_server_sdk.model.CapturingEvent:
|
39 + | pub fn as_event(&self) -> ::pyo3::PyResult<crate::model::CapturingEvent> {
|
40 + | match self.0.as_event() {
|
41 + | Ok(variant) => Ok(variant.clone()),
|
42 + | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
43 + | r"AttemptCapturingPokemonEvent variant is not of type pokemon_service_server_sdk.model.CapturingEvent",
|
44 + | )),
|
45 + | }
|
46 + | }
|
47 + | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
48 + | /// :rtype bool:
|
49 + | pub fn is_event(&self) -> bool {
|
50 + | self.0.is_event()
|
51 + | }
|
52 + | }
|
53 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for AttemptCapturingPokemonEvent {
|
54 + | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
55 + | PyUnionMarkerAttemptCapturingPokemonEvent(self).into_py(py)
|
56 + | }
|
57 + | }
|
58 + | impl<'source> ::pyo3::FromPyObject<'source> for AttemptCapturingPokemonEvent {
|
59 + | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
60 + | let data: PyUnionMarkerAttemptCapturingPokemonEvent = obj.extract()?;
|
61 + | Ok(data.0)
|
62 + | }
|
63 + | }
|
64 + |
|
65 + | #[allow(missing_docs)] // documentation missing in model
|
66 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
67 + | pub enum CapturePokemonEvents {
|
68 + | #[allow(missing_docs)] // documentation missing in model
|
69 + | Event(crate::model::CaptureEvent),
|
70 + | }
|
71 + | impl CapturePokemonEvents {
|
72 + | #[allow(irrefutable_let_patterns)]
|
73 + | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
74 + | /// Returns `Err(&Self)` if it can't be converted.
|
75 + | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
|
76 + | if let CapturePokemonEvents::Event(val) = &self {
|
77 + | ::std::result::Result::Ok(val)
|
78 + | } else {
|
79 + | ::std::result::Result::Err(self)
|
80 + | }
|
81 + | }
|
82 + | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
83 + | pub fn is_event(&self) -> bool {
|
84 + | self.as_event().is_ok()
|
85 + | }
|
86 + | }
|
87 + | #[pyo3::pyclass(name = "CapturePokemonEvents")]
|
88 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
89 + | pub struct PyUnionMarkerCapturePokemonEvents(pub CapturePokemonEvents);
|
90 + | #[::pyo3::pymethods]
|
91 + | impl PyUnionMarkerCapturePokemonEvents {
|
92 + | #[allow(irrefutable_let_patterns)]
|
93 + | #[staticmethod]
|
94 + | /// Creates a new union instance of [`Event`](crate::model::CapturePokemonEvents::Event)
|
95 + | /// :param data pokemon_service_server_sdk.model.CaptureEvent:
|
96 + | /// :rtype CapturePokemonEvents:
|
97 + | pub fn event(data: crate::model::CaptureEvent) -> Self {
|
98 + | Self(CapturePokemonEvents::Event(data))
|
99 + | }
|
100 + | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
101 + | /// :rtype pokemon_service_server_sdk.model.CaptureEvent:
|
102 + | pub fn as_event(&self) -> ::pyo3::PyResult<crate::model::CaptureEvent> {
|
103 + | match self.0.as_event() {
|
104 + | Ok(variant) => Ok(variant.clone()),
|
105 + | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
106 + | r"CapturePokemonEvents variant is not of type pokemon_service_server_sdk.model.CaptureEvent",
|
107 + | )),
|
108 + | }
|
109 + | }
|
110 + | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
111 + | /// :rtype bool:
|
112 + | pub fn is_event(&self) -> bool {
|
113 + | self.0.is_event()
|
114 + | }
|
115 + | }
|
116 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for CapturePokemonEvents {
|
117 + | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
118 + | PyUnionMarkerCapturePokemonEvents(self).into_py(py)
|
119 + | }
|
120 + | }
|
121 + | impl<'source> ::pyo3::FromPyObject<'source> for CapturePokemonEvents {
|
122 + | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
123 + | let data: PyUnionMarkerCapturePokemonEvents = obj.extract()?;
|
124 + | Ok(data.0)
|
125 + | }
|
126 + | }
|
127 + |
|
2 128 | #[::pyo3::pyclass]
|
3 - | /// :param path str:
|
4 - | /// :param message str:
|
129 + | /// :param payload typing.Optional\[pokemon_service_server_sdk.model.CapturingPayload\]:
|
5 130 | /// :rtype None:
|
6 - | /// Describes one specific validation failure for an input member.
|
131 + | #[allow(missing_docs)] // documentation missing in model
|
7 132 | #[derive(
|
8 133 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
9 134 | )]
|
10 - | pub struct ValidationExceptionField {
|
11 - | #[pyo3(get, set)]
|
12 - | /// :type str:
|
13 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
14 - | pub path: ::std::string::String,
|
135 + | pub struct CapturingEvent {
|
15 136 | #[pyo3(get, set)]
|
16 - | /// :type str:
|
17 - | /// A detailed description of the validation failure.
|
18 - | pub message: ::std::string::String,
|
137 + | /// :type typing.Optional\[pokemon_service_server_sdk.model.CapturingPayload\]:
|
138 + | #[allow(missing_docs)] // documentation missing in model
|
139 + | pub payload: ::std::option::Option<crate::model::CapturingPayload>,
|
19 140 | }
|
20 - | impl ValidationExceptionField {
|
21 - | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
22 - | pub fn path(&self) -> &str {
|
23 - | use std::ops::Deref;
|
24 - | self.path.deref()
|
25 - | }
|
26 - | /// A detailed description of the validation failure.
|
27 - | pub fn message(&self) -> &str {
|
28 - | use std::ops::Deref;
|
29 - | self.message.deref()
|
141 + | impl CapturingEvent {
|
142 + | #[allow(missing_docs)] // documentation missing in model
|
143 + | pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
|
144 + | self.payload.as_ref()
|
30 145 | }
|
31 146 | }
|
32 147 | #[allow(clippy::new_without_default)]
|
33 148 | #[allow(clippy::too_many_arguments)]
|
34 149 | #[::pyo3::pymethods]
|
35 - | impl ValidationExceptionField {
|
150 + | impl CapturingEvent {
|
36 151 | #[new]
|
37 - | pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
|
38 - | Self { path, message }
|
152 + | pub fn new(payload: ::std::option::Option<crate::model::CapturingPayload>) -> Self {
|
153 + | Self { payload }
|
39 154 | }
|
40 155 | fn __repr__(&self) -> String {
|
41 156 | format!("{self:?}")
|
42 157 | }
|
43 158 | fn __str__(&self) -> String {
|
44 159 | format!("{self:?}")
|
45 160 | }
|
46 161 | }
|
47 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
|
162 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CapturingEvent> {
|
48 163 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
49 - | ob.extract::<ValidationExceptionField>().map(Box::new)
|
164 + | ob.extract::<CapturingEvent>().map(Box::new)
|
50 165 | }
|
51 166 | }
|
52 167 |
|
53 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
|
168 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CapturingEvent> {
|
54 169 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
55 170 | (*self).into_py(py)
|
56 171 | }
|
57 172 | }
|
58 - | impl ValidationExceptionField {
|
59 - | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
60 - | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
61 - | crate::model::validation_exception_field::Builder::default()
|
173 + | impl crate::constrained::Constrained for crate::model::CapturingEvent {
|
174 + | type Unconstrained = crate::model::capturing_event_internal::Builder;
|
175 + | }
|
176 + | impl CapturingEvent {
|
177 + | /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
|
178 + | pub fn builder() -> crate::model::capturing_event::Builder {
|
179 + | crate::model::capturing_event::Builder::default()
|
62 180 | }
|
63 181 | }
|
64 182 |
|
65 183 | #[::pyo3::pyclass]
|
66 - | /// :param flavor_text str:
|
67 - | /// :param language pokemon_service_server_sdk.model.Language:
|
184 + | /// :param name typing.Optional\[str\]:
|
185 + | /// :param captured typing.Optional\[bool\]:
|
186 + | /// :param shiny typing.Optional\[bool\]:
|
187 + | /// :param pokedex_update typing.Optional\[pokemon_service_server_sdk.types.Blob\]:
|
68 188 | /// :rtype None:
|
69 189 | #[allow(missing_docs)] // documentation missing in model
|
70 190 | #[derive(
|
71 191 | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
72 192 | )]
|
73 - | pub struct FlavorText {
|
193 + | pub struct CaptureEvent {
|
74 194 | #[pyo3(get, set)]
|
75 - | /// :type str:
|
76 - | /// The localized flavor text for an API resource in a specific language.
|
77 - | pub flavor_text: ::std::string::String,
|
195 + | /// :type typing.Optional\[str\]:
|
196 + | #[allow(missing_docs)] // documentation missing in model
|
197 + | pub name: ::std::option::Option<::std::string::String>,
|
78 198 | #[pyo3(get, set)]
|
79 - | /// :type pokemon_service_server_sdk.model.Language:
|
80 - | /// The language this name is in.
|
81 - | pub language: crate::model::Language,
|
199 + | /// :type typing.Optional\[bool\]:
|
200 + | #[allow(missing_docs)] // documentation missing in model
|
201 + | pub captured: ::std::option::Option<bool>,
|
202 + | #[pyo3(get, set)]
|
203 + | /// :type typing.Optional\[bool\]:
|
204 + | #[allow(missing_docs)] // documentation missing in model
|
205 + | pub shiny: ::std::option::Option<bool>,
|
206 + | #[pyo3(get, set)]
|
207 + | /// :type typing.Optional\[pokemon_service_server_sdk.types.Blob\]:
|
208 + | #[allow(missing_docs)] // documentation missing in model
|
209 + | pub pokedex_update: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
82 210 | }
|
83 - | impl FlavorText {
|
84 - | /// The localized flavor text for an API resource in a specific language.
|
85 - | pub fn flavor_text(&self) -> &str {
|
86 - | use std::ops::Deref;
|
87 - | self.flavor_text.deref()
|
211 + | impl CaptureEvent {
|
212 + | #[allow(missing_docs)] // documentation missing in model
|
213 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
214 + | self.name.as_deref()
|
88 215 | }
|
89 - | /// The language this name is in.
|
90 - | pub fn language(&self) -> &crate::model::Language {
|
91 - | &self.language
|
216 + | #[allow(missing_docs)] // documentation missing in model
|
217 + | pub fn captured(&self) -> ::std::option::Option<bool> {
|
218 + | self.captured
|
219 + | }
|
220 + | #[allow(missing_docs)] // documentation missing in model
|
221 + | pub fn shiny(&self) -> ::std::option::Option<bool> {
|
222 + | self.shiny
|
223 + | }
|
224 + | #[allow(missing_docs)] // documentation missing in model
|
225 + | pub fn pokedex_update(
|
226 + | &self,
|
227 + | ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
|
228 + | self.pokedex_update.as_ref()
|
92 229 | }
|
93 230 | }
|
94 231 | #[allow(clippy::new_without_default)]
|
95 232 | #[allow(clippy::too_many_arguments)]
|
96 233 | #[::pyo3::pymethods]
|
97 - | impl FlavorText {
|
234 + | impl CaptureEvent {
|
98 235 | #[new]
|
99 - | pub fn new(flavor_text: ::std::string::String, language: crate::model::Language) -> Self {
|
236 + | pub fn new(
|
237 + | name: ::std::option::Option<::std::string::String>,
|
238 + | captured: ::std::option::Option<bool>,
|
239 + | shiny: ::std::option::Option<bool>,
|
240 + | pokedex_update: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
241 + | ) -> Self {
|
100 242 | Self {
|
101 - | flavor_text,
|
102 - | language,
|
243 + | name,
|
244 + | captured,
|
245 + | shiny,
|
246 + | pokedex_update,
|
103 247 | }
|
104 248 | }
|
105 249 | fn __repr__(&self) -> String {
|
106 250 | format!("{self:?}")
|
107 251 | }
|
108 252 | fn __str__(&self) -> String {
|
109 253 | format!("{self:?}")
|
110 254 | }
|
111 255 | }
|
112 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<FlavorText> {
|
256 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CaptureEvent> {
|
113 257 | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
114 - | ob.extract::<FlavorText>().map(Box::new)
|
258 + | ob.extract::<CaptureEvent>().map(Box::new)
|
115 259 | }
|
116 260 | }
|
117 261 |
|
118 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<FlavorText> {
|
262 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CaptureEvent> {
|
119 263 | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
120 264 | (*self).into_py(py)
|
121 265 | }
|
122 266 | }
|
123 - | impl FlavorText {
|
124 - | /// Creates a new builder-style object to manufacture [`FlavorText`](crate::model::FlavorText).
|
267 + | impl CaptureEvent {
|
268 + | /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
|
269 + | pub fn builder() -> crate::model::capture_event::Builder {
|
270 + | crate::model::capture_event::Builder::default()
|
271 + | }
|
272 + | }
|
273 + |
|
274 + | #[::pyo3::pyclass]
|
275 + | /// :param path str:
|
276 + | /// :param message str:
|
277 + | /// :rtype None:
|
278 + | /// Describes one specific validation failure for an input member.
|
279 + | #[derive(
|
280 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
281 + | )]
|
282 + | pub struct ValidationExceptionField {
|
283 + | #[pyo3(get, set)]
|
284 + | /// :type str:
|
285 + | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
286 + | pub path: ::std::string::String,
|
287 + | #[pyo3(get, set)]
|
288 + | /// :type str:
|
289 + | /// A detailed description of the validation failure.
|
290 + | pub message: ::std::string::String,
|
291 + | }
|
292 + | impl ValidationExceptionField {
|
293 + | /// A JSONPointer expression to the structure member whose value failed to satisfy the modeled constraints.
|
294 + | pub fn path(&self) -> &str {
|
295 + | use std::ops::Deref;
|
296 + | self.path.deref()
|
297 + | }
|
298 + | /// A detailed description of the validation failure.
|
299 + | pub fn message(&self) -> &str {
|
300 + | use std::ops::Deref;
|
301 + | self.message.deref()
|
302 + | }
|
303 + | }
|
304 + | #[allow(clippy::new_without_default)]
|
305 + | #[allow(clippy::too_many_arguments)]
|
306 + | #[::pyo3::pymethods]
|
307 + | impl ValidationExceptionField {
|
308 + | #[new]
|
309 + | pub fn new(path: ::std::string::String, message: ::std::string::String) -> Self {
|
310 + | Self { path, message }
|
311 + | }
|
312 + | fn __repr__(&self) -> String {
|
313 + | format!("{self:?}")
|
314 + | }
|
315 + | fn __str__(&self) -> String {
|
316 + | format!("{self:?}")
|
317 + | }
|
318 + | }
|
319 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<ValidationExceptionField> {
|
320 + | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
321 + | ob.extract::<ValidationExceptionField>().map(Box::new)
|
322 + | }
|
323 + | }
|
324 + |
|
325 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<ValidationExceptionField> {
|
326 + | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
327 + | (*self).into_py(py)
|
328 + | }
|
329 + | }
|
330 + | impl ValidationExceptionField {
|
331 + | /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
332 + | pub fn builder() -> crate::model::validation_exception_field::Builder {
|
333 + | crate::model::validation_exception_field::Builder::default()
|
334 + | }
|
335 + | }
|
336 + |
|
337 + | #[::pyo3::pyclass]
|
338 + | /// :param flavor_text str:
|
339 + | /// :param language pokemon_service_server_sdk.model.Language:
|
340 + | /// :rtype None:
|
341 + | #[allow(missing_docs)] // documentation missing in model
|
342 + | #[derive(
|
343 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
344 + | )]
|
345 + | pub struct FlavorText {
|
346 + | #[pyo3(get, set)]
|
347 + | /// :type str:
|
348 + | /// The localized flavor text for an API resource in a specific language.
|
349 + | pub flavor_text: ::std::string::String,
|
350 + | #[pyo3(get, set)]
|
351 + | /// :type pokemon_service_server_sdk.model.Language:
|
352 + | /// The language this name is in.
|
353 + | pub language: crate::model::Language,
|
354 + | }
|
355 + | impl FlavorText {
|
356 + | /// The localized flavor text for an API resource in a specific language.
|
357 + | pub fn flavor_text(&self) -> &str {
|
358 + | use std::ops::Deref;
|
359 + | self.flavor_text.deref()
|
360 + | }
|
361 + | /// The language this name is in.
|
362 + | pub fn language(&self) -> &crate::model::Language {
|
363 + | &self.language
|
364 + | }
|
365 + | }
|
366 + | #[allow(clippy::new_without_default)]
|
367 + | #[allow(clippy::too_many_arguments)]
|
368 + | #[::pyo3::pymethods]
|
369 + | impl FlavorText {
|
370 + | #[new]
|
371 + | pub fn new(flavor_text: ::std::string::String, language: crate::model::Language) -> Self {
|
372 + | Self {
|
373 + | flavor_text,
|
374 + | language,
|
375 + | }
|
376 + | }
|
377 + | fn __repr__(&self) -> String {
|
378 + | format!("{self:?}")
|
379 + | }
|
380 + | fn __str__(&self) -> String {
|
381 + | format!("{self:?}")
|
382 + | }
|
383 + | }
|
384 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<FlavorText> {
|
385 + | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
386 + | ob.extract::<FlavorText>().map(Box::new)
|
387 + | }
|
388 + | }
|
389 + |
|
390 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<FlavorText> {
|
391 + | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
392 + | (*self).into_py(py)
|
393 + | }
|
394 + | }
|
395 + | impl FlavorText {
|
396 + | /// Creates a new builder-style object to manufacture [`FlavorText`](crate::model::FlavorText).
|
125 397 | pub fn builder() -> crate::model::flavor_text::Builder {
|
126 398 | crate::model::flavor_text::Builder::default()
|
127 399 | }
|
128 400 | }
|
129 401 |
|
402 + | #[::pyo3::pyclass]
|
403 + | /// :param name typing.Optional\[str\]:
|
404 + | /// :param pokeball typing.Optional\[str\]:
|
405 + | /// :rtype None:
|
406 + | #[allow(missing_docs)] // documentation missing in model
|
407 + | #[derive(
|
408 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
409 + | )]
|
410 + | pub struct CapturingPayload {
|
411 + | #[pyo3(get, set)]
|
412 + | /// :type typing.Optional\[str\]:
|
413 + | #[allow(missing_docs)] // documentation missing in model
|
414 + | pub name: ::std::option::Option<::std::string::String>,
|
415 + | #[pyo3(get, set)]
|
416 + | /// :type typing.Optional\[str\]:
|
417 + | #[allow(missing_docs)] // documentation missing in model
|
418 + | pub pokeball: ::std::option::Option<::std::string::String>,
|
419 + | }
|
420 + | impl CapturingPayload {
|
421 + | #[allow(missing_docs)] // documentation missing in model
|
422 + | pub fn name(&self) -> ::std::option::Option<&str> {
|
423 + | self.name.as_deref()
|
424 + | }
|
425 + | #[allow(missing_docs)] // documentation missing in model
|
426 + | pub fn pokeball(&self) -> ::std::option::Option<&str> {
|
427 + | self.pokeball.as_deref()
|
428 + | }
|
429 + | }
|
430 + | #[allow(clippy::new_without_default)]
|
431 + | #[allow(clippy::too_many_arguments)]
|
432 + | #[::pyo3::pymethods]
|
433 + | impl CapturingPayload {
|
434 + | #[new]
|
435 + | pub fn new(
|
436 + | name: ::std::option::Option<::std::string::String>,
|
437 + | pokeball: ::std::option::Option<::std::string::String>,
|
438 + | ) -> Self {
|
439 + | Self { name, pokeball }
|
440 + | }
|
441 + | fn __repr__(&self) -> String {
|
442 + | format!("{self:?}")
|
443 + | }
|
444 + | fn __str__(&self) -> String {
|
445 + | format!("{self:?}")
|
446 + | }
|
447 + | }
|
448 + | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CapturingPayload> {
|
449 + | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
450 + | ob.extract::<CapturingPayload>().map(Box::new)
|
451 + | }
|
452 + | }
|
453 + |
|
454 + | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CapturingPayload> {
|
455 + | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
456 + | (*self).into_py(py)
|
457 + | }
|
458 + | }
|
459 + | impl crate::constrained::Constrained for crate::model::CapturingPayload {
|
460 + | type Unconstrained = crate::model::capturing_payload_internal::Builder;
|
461 + | }
|
462 + | impl CapturingPayload {
|
463 + | /// Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
|
464 + | pub fn builder() -> crate::model::capturing_payload::Builder {
|
465 + | crate::model::capturing_payload::Builder::default()
|
466 + | }
|
467 + | }
|
468 + |
|
130 469 | #[::pyo3::pyclass]
|
131 470 | /// Supported languages for FlavorText entries.
|
132 471 | #[derive(
|
133 472 | ::std::clone::Clone,
|
134 473 | ::std::cmp::Eq,
|
135 474 | ::std::cmp::Ord,
|
136 475 | ::std::cmp::PartialEq,
|
137 476 | ::std::cmp::PartialOrd,
|
138 477 | ::std::fmt::Debug,
|
139 478 | ::std::hash::Hash,
|
240 579 | type Unconstrained = ::std::string::String;
|
241 580 | }
|
242 581 |
|
243 582 | impl ::std::convert::From<::std::string::String>
|
244 583 | for crate::constrained::MaybeConstrained<crate::model::Language>
|
245 584 | {
|
246 585 | fn from(value: ::std::string::String) -> Self {
|
247 586 | Self::Unconstrained(value)
|
248 587 | }
|
249 588 | }
|
589 + | /// See [`CapturingEvent`](crate::model::CapturingEvent).
|
590 + | pub(crate) mod capturing_event_internal {
|
250 591 |
|
251 - | #[allow(missing_docs)] // documentation missing in model
|
252 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
253 - | pub enum CapturePokemonEvents {
|
254 - | #[allow(missing_docs)] // documentation missing in model
|
255 - | Event(crate::model::CaptureEvent),
|
256 - | }
|
257 - | impl CapturePokemonEvents {
|
258 - | #[allow(irrefutable_let_patterns)]
|
259 - | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
260 - | /// Returns `Err(&Self)` if it can't be converted.
|
261 - | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CaptureEvent, &Self> {
|
262 - | if let CapturePokemonEvents::Event(val) = &self {
|
263 - | ::std::result::Result::Ok(val)
|
264 - | } else {
|
265 - | ::std::result::Result::Err(self)
|
266 - | }
|
267 - | }
|
268 - | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
269 - | pub fn is_event(&self) -> bool {
|
270 - | self.as_event().is_ok()
|
271 - | }
|
272 - | }
|
273 - | #[pyo3::pyclass(name = "CapturePokemonEvents")]
|
274 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
275 - | pub struct PyUnionMarkerCapturePokemonEvents(pub CapturePokemonEvents);
|
276 - | #[::pyo3::pymethods]
|
277 - | impl PyUnionMarkerCapturePokemonEvents {
|
278 - | #[allow(irrefutable_let_patterns)]
|
279 - | #[staticmethod]
|
280 - | /// Creates a new union instance of [`Event`](crate::model::CapturePokemonEvents::Event)
|
281 - | /// :param data pokemon_service_server_sdk.model.CaptureEvent:
|
282 - | /// :rtype CapturePokemonEvents:
|
283 - | pub fn event(data: crate::model::CaptureEvent) -> Self {
|
284 - | Self(CapturePokemonEvents::Event(data))
|
285 - | }
|
286 - | /// Tries to convert the enum instance into [`Event`](crate::model::CapturePokemonEvents::Event), extracting the inner [`CaptureEvent`](crate::model::CaptureEvent).
|
287 - | /// :rtype pokemon_service_server_sdk.model.CaptureEvent:
|
288 - | pub fn as_event(&self) -> ::pyo3::PyResult<crate::model::CaptureEvent> {
|
289 - | match self.0.as_event() {
|
290 - | Ok(variant) => Ok(variant.clone()),
|
291 - | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
292 - | r"CapturePokemonEvents variant is not of type pokemon_service_server_sdk.model.CaptureEvent",
|
293 - | )),
|
294 - | }
|
295 - | }
|
296 - | /// Returns true if this is a [`Event`](crate::model::CapturePokemonEvents::Event).
|
297 - | /// :rtype bool:
|
298 - | pub fn is_event(&self) -> bool {
|
299 - | self.0.is_event()
|
300 - | }
|
301 - | }
|
302 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for CapturePokemonEvents {
|
303 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
304 - | PyUnionMarkerCapturePokemonEvents(self).into_py(py)
|
305 - | }
|
306 - | }
|
307 - | impl<'source> ::pyo3::FromPyObject<'source> for CapturePokemonEvents {
|
308 - | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
309 - | let data: PyUnionMarkerCapturePokemonEvents = obj.extract()?;
|
310 - | Ok(data.0)
|
311 - | }
|
312 - | }
|
313 - |
|
314 - | #[::pyo3::pyclass]
|
315 - | /// :param name typing.Optional\[str\]:
|
316 - | /// :param captured typing.Optional\[bool\]:
|
317 - | /// :param shiny typing.Optional\[bool\]:
|
318 - | /// :param pokedex_update typing.Optional\[pokemon_service_server_sdk.types.Blob\]:
|
319 - | /// :rtype None:
|
320 - | #[allow(missing_docs)] // documentation missing in model
|
321 - | #[derive(
|
322 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
323 - | )]
|
324 - | pub struct CaptureEvent {
|
325 - | #[pyo3(get, set)]
|
326 - | /// :type typing.Optional\[str\]:
|
327 - | #[allow(missing_docs)] // documentation missing in model
|
328 - | pub name: ::std::option::Option<::std::string::String>,
|
329 - | #[pyo3(get, set)]
|
330 - | /// :type typing.Optional\[bool\]:
|
331 - | #[allow(missing_docs)] // documentation missing in model
|
332 - | pub captured: ::std::option::Option<bool>,
|
333 - | #[pyo3(get, set)]
|
334 - | /// :type typing.Optional\[bool\]:
|
335 - | #[allow(missing_docs)] // documentation missing in model
|
336 - | pub shiny: ::std::option::Option<bool>,
|
337 - | #[pyo3(get, set)]
|
338 - | /// :type typing.Optional\[pokemon_service_server_sdk.types.Blob\]:
|
339 - | #[allow(missing_docs)] // documentation missing in model
|
340 - | pub pokedex_update: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
341 - | }
|
342 - | impl CaptureEvent {
|
343 - | #[allow(missing_docs)] // documentation missing in model
|
344 - | pub fn name(&self) -> ::std::option::Option<&str> {
|
345 - | self.name.as_deref()
|
346 - | }
|
347 - | #[allow(missing_docs)] // documentation missing in model
|
348 - | pub fn captured(&self) -> ::std::option::Option<bool> {
|
349 - | self.captured
|
350 - | }
|
351 - | #[allow(missing_docs)] // documentation missing in model
|
352 - | pub fn shiny(&self) -> ::std::option::Option<bool> {
|
353 - | self.shiny
|
354 - | }
|
355 - | #[allow(missing_docs)] // documentation missing in model
|
356 - | pub fn pokedex_update(
|
357 - | &self,
|
358 - | ) -> ::std::option::Option<&::aws_smithy_http_server_python::types::Blob> {
|
359 - | self.pokedex_update.as_ref()
|
360 - | }
|
361 - | }
|
362 - | #[allow(clippy::new_without_default)]
|
363 - | #[allow(clippy::too_many_arguments)]
|
364 - | #[::pyo3::pymethods]
|
365 - | impl CaptureEvent {
|
366 - | #[new]
|
367 - | pub fn new(
|
368 - | name: ::std::option::Option<::std::string::String>,
|
369 - | captured: ::std::option::Option<bool>,
|
370 - | shiny: ::std::option::Option<bool>,
|
371 - | pokedex_update: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
372 - | ) -> Self {
|
373 - | Self {
|
374 - | name,
|
375 - | captured,
|
376 - | shiny,
|
377 - | pokedex_update,
|
378 - | }
|
379 - | }
|
380 - | fn __repr__(&self) -> String {
|
381 - | format!("{self:?}")
|
382 - | }
|
383 - | fn __str__(&self) -> String {
|
384 - | format!("{self:?}")
|
385 - | }
|
386 - | }
|
387 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CaptureEvent> {
|
388 - | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
389 - | ob.extract::<CaptureEvent>().map(Box::new)
|
390 - | }
|
391 - | }
|
392 - |
|
393 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CaptureEvent> {
|
394 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
395 - | (*self).into_py(py)
|
396 - | }
|
397 - | }
|
398 - | impl CaptureEvent {
|
399 - | /// Creates a new builder-style object to manufacture [`CaptureEvent`](crate::model::CaptureEvent).
|
400 - | pub fn builder() -> crate::model::capture_event::Builder {
|
401 - | crate::model::capture_event::Builder::default()
|
402 - | }
|
403 - | }
|
404 - |
|
405 - | #[allow(missing_docs)] // documentation missing in model
|
406 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
407 - | pub enum AttemptCapturingPokemonEvent {
|
408 - | #[allow(missing_docs)] // documentation missing in model
|
409 - | Event(crate::model::CapturingEvent),
|
410 - | }
|
411 - | impl AttemptCapturingPokemonEvent {
|
412 - | #[allow(irrefutable_let_patterns)]
|
413 - | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
414 - | /// Returns `Err(&Self)` if it can't be converted.
|
415 - | pub fn as_event(&self) -> ::std::result::Result<&crate::model::CapturingEvent, &Self> {
|
416 - | if let AttemptCapturingPokemonEvent::Event(val) = &self {
|
417 - | ::std::result::Result::Ok(val)
|
418 - | } else {
|
419 - | ::std::result::Result::Err(self)
|
420 - | }
|
421 - | }
|
422 - | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
423 - | pub fn is_event(&self) -> bool {
|
424 - | self.as_event().is_ok()
|
425 - | }
|
426 - | }
|
427 - | #[pyo3::pyclass(name = "AttemptCapturingPokemonEvent")]
|
428 - | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
429 - | pub struct PyUnionMarkerAttemptCapturingPokemonEvent(pub AttemptCapturingPokemonEvent);
|
430 - | #[::pyo3::pymethods]
|
431 - | impl PyUnionMarkerAttemptCapturingPokemonEvent {
|
432 - | #[allow(irrefutable_let_patterns)]
|
433 - | #[staticmethod]
|
434 - | /// Creates a new union instance of [`Event`](crate::model::AttemptCapturingPokemonEvent::Event)
|
435 - | /// :param data pokemon_service_server_sdk.model.CapturingEvent:
|
436 - | /// :rtype AttemptCapturingPokemonEvent:
|
437 - | pub fn event(data: crate::model::CapturingEvent) -> Self {
|
438 - | Self(AttemptCapturingPokemonEvent::Event(data))
|
439 - | }
|
440 - | /// Tries to convert the enum instance into [`Event`](crate::model::AttemptCapturingPokemonEvent::Event), extracting the inner [`CapturingEvent`](crate::model::CapturingEvent).
|
441 - | /// :rtype pokemon_service_server_sdk.model.CapturingEvent:
|
442 - | pub fn as_event(&self) -> ::pyo3::PyResult<crate::model::CapturingEvent> {
|
443 - | match self.0.as_event() {
|
444 - | Ok(variant) => Ok(variant.clone()),
|
445 - | Err(_) => Err(::pyo3::exceptions::PyValueError::new_err(
|
446 - | r"AttemptCapturingPokemonEvent variant is not of type pokemon_service_server_sdk.model.CapturingEvent",
|
447 - | )),
|
592 + | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
593 + | fn from(builder: Builder) -> Self {
|
594 + | builder.build()
|
448 595 | }
|
449 596 | }
|
450 - | /// Returns true if this is a [`Event`](crate::model::AttemptCapturingPokemonEvent::Event).
|
451 - | /// :rtype bool:
|
452 - | pub fn is_event(&self) -> bool {
|
453 - | self.0.is_event()
|
454 - | }
|
455 - | }
|
456 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for AttemptCapturingPokemonEvent {
|
457 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
458 - | PyUnionMarkerAttemptCapturingPokemonEvent(self).into_py(py)
|
459 - | }
|
460 - | }
|
461 - | impl<'source> ::pyo3::FromPyObject<'source> for AttemptCapturingPokemonEvent {
|
462 - | fn extract(obj: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
463 - | let data: PyUnionMarkerAttemptCapturingPokemonEvent = obj.extract()?;
|
464 - | Ok(data.0)
|
465 - | }
|
466 - | }
|
467 - |
|
468 - | #[::pyo3::pyclass]
|
469 - | /// :param payload typing.Optional\[pokemon_service_server_sdk.model.CapturingPayload\]:
|
470 - | /// :rtype None:
|
471 - | #[allow(missing_docs)] // documentation missing in model
|
472 - | #[derive(
|
473 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
474 - | )]
|
475 - | pub struct CapturingEvent {
|
476 - | #[pyo3(get, set)]
|
477 - | /// :type typing.Optional\[pokemon_service_server_sdk.model.CapturingPayload\]:
|
478 - | #[allow(missing_docs)] // documentation missing in model
|
479 - | pub payload: ::std::option::Option<crate::model::CapturingPayload>,
|
480 - | }
|
481 - | impl CapturingEvent {
|
482 - | #[allow(missing_docs)] // documentation missing in model
|
483 - | pub fn payload(&self) -> ::std::option::Option<&crate::model::CapturingPayload> {
|
484 - | self.payload.as_ref()
|
485 - | }
|
486 - | }
|
487 - | #[allow(clippy::new_without_default)]
|
488 - | #[allow(clippy::too_many_arguments)]
|
489 - | #[::pyo3::pymethods]
|
490 - | impl CapturingEvent {
|
491 - | #[new]
|
492 - | pub fn new(payload: ::std::option::Option<crate::model::CapturingPayload>) -> Self {
|
493 - | Self { payload }
|
494 - | }
|
495 - | fn __repr__(&self) -> String {
|
496 - | format!("{self:?}")
|
497 - | }
|
498 - | fn __str__(&self) -> String {
|
499 - | format!("{self:?}")
|
500 - | }
|
501 - | }
|
502 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CapturingEvent> {
|
503 - | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
504 - | ob.extract::<CapturingEvent>().map(Box::new)
|
505 - | }
|
506 - | }
|
507 - |
|
508 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CapturingEvent> {
|
509 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
510 - | (*self).into_py(py)
|
511 - | }
|
512 - | }
|
513 - | impl crate::constrained::Constrained for crate::model::CapturingEvent {
|
514 - | type Unconstrained = crate::model::capturing_event_internal::Builder;
|
515 - | }
|
516 - | impl CapturingEvent {
|
517 - | /// Creates a new builder-style object to manufacture [`CapturingEvent`](crate::model::CapturingEvent).
|
518 - | pub fn builder() -> crate::model::capturing_event::Builder {
|
519 - | crate::model::capturing_event::Builder::default()
|
520 - | }
|
521 - | }
|
522 - |
|
523 - | #[::pyo3::pyclass]
|
524 - | /// :param name typing.Optional\[str\]:
|
525 - | /// :param pokeball typing.Optional\[str\]:
|
526 - | /// :rtype None:
|
527 - | #[allow(missing_docs)] // documentation missing in model
|
528 - | #[derive(
|
529 - | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
530 - | )]
|
531 - | pub struct CapturingPayload {
|
532 - | #[pyo3(get, set)]
|
533 - | /// :type typing.Optional\[str\]:
|
534 - | #[allow(missing_docs)] // documentation missing in model
|
535 - | pub name: ::std::option::Option<::std::string::String>,
|
536 - | #[pyo3(get, set)]
|
537 - | /// :type typing.Optional\[str\]:
|
538 - | #[allow(missing_docs)] // documentation missing in model
|
539 - | pub pokeball: ::std::option::Option<::std::string::String>,
|
540 - | }
|
541 - | impl CapturingPayload {
|
542 - | #[allow(missing_docs)] // documentation missing in model
|
543 - | pub fn name(&self) -> ::std::option::Option<&str> {
|
544 - | self.name.as_deref()
|
597 + | /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
598 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
599 + | pub(crate) struct Builder {
|
600 + | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
545 601 | }
|
546 - | #[allow(missing_docs)] // documentation missing in model
|
547 - | pub fn pokeball(&self) -> ::std::option::Option<&str> {
|
548 - | self.pokeball.as_deref()
|
602 + | impl Builder {
|
603 + | #[allow(missing_docs)] // documentation missing in model
|
604 + | pub(crate) fn set_payload(
|
605 + | mut self,
|
606 + | input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
|
607 + | ) -> Self {
|
608 + | self.payload = input.map(|v| v.into());
|
609 + | self
|
610 + | }
|
611 + | /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
612 + | pub fn build(self) -> crate::model::CapturingEvent {
|
613 + | self.build_enforcing_all_constraints()
|
614 + | }
|
615 + | fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
|
616 + | crate::model::CapturingEvent {
|
617 + | payload: self.payload,
|
618 + | }
|
619 + | }
|
549 620 | }
|
550 621 | }
|
551 - | #[allow(clippy::new_without_default)]
|
552 - | #[allow(clippy::too_many_arguments)]
|
553 - | #[::pyo3::pymethods]
|
554 - | impl CapturingPayload {
|
555 - | #[new]
|
556 - | pub fn new(
|
557 - | name: ::std::option::Option<::std::string::String>,
|
558 - | pokeball: ::std::option::Option<::std::string::String>,
|
559 - | ) -> Self {
|
560 - | Self { name, pokeball }
|
561 - | }
|
562 - | fn __repr__(&self) -> String {
|
563 - | format!("{self:?}")
|
622 + | /// See [`CapturingEvent`](crate::model::CapturingEvent).
|
623 + | pub mod capturing_event {
|
624 + |
|
625 + | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
626 + | fn from(builder: Builder) -> Self {
|
627 + | builder.build()
|
628 + | }
|
564 629 | }
|
565 - | fn __str__(&self) -> String {
|
566 - | format!("{self:?}")
|
630 + | /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
631 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
632 + | pub struct Builder {
|
633 + | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
567 634 | }
|
568 - | }
|
569 - | impl<'source> ::pyo3::FromPyObject<'source> for std::boxed::Box<CapturingPayload> {
|
570 - | fn extract(ob: &'source ::pyo3::PyAny) -> ::pyo3::PyResult<Self> {
|
571 - | ob.extract::<CapturingPayload>().map(Box::new)
|
635 + | impl Builder {
|
636 + | #[allow(missing_docs)] // documentation missing in model
|
637 + | pub fn payload(
|
638 + | mut self,
|
639 + | input: ::std::option::Option<crate::model::CapturingPayload>,
|
640 + | ) -> Self {
|
641 + | self.payload = input;
|
642 + | self
|
643 + | }
|
644 + | /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
645 + | pub fn build(self) -> crate::model::CapturingEvent {
|
646 + | self.build_enforcing_required_and_enum_traits()
|
647 + | }
|
648 + | fn build_enforcing_required_and_enum_traits(self) -> crate::model::CapturingEvent {
|
649 + | crate::model::CapturingEvent {
|
650 + | payload: self.payload,
|
651 + | }
|
652 + | }
|
572 653 | }
|
573 654 | }
|
655 + | /// See [`CaptureEvent`](crate::model::CaptureEvent).
|
656 + | pub mod capture_event {
|
574 657 |
|
575 - | impl ::pyo3::IntoPy<::pyo3::PyObject> for std::boxed::Box<CapturingPayload> {
|
576 - | fn into_py(self, py: ::pyo3::Python<'_>) -> ::pyo3::PyObject {
|
577 - | (*self).into_py(py)
|
658 + | impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
|
659 + | fn from(builder: Builder) -> Self {
|
660 + | builder.build()
|
661 + | }
|
578 662 | }
|
579 - | }
|
580 - | impl crate::constrained::Constrained for crate::model::CapturingPayload {
|
581 - | type Unconstrained = crate::model::capturing_payload_internal::Builder;
|
582 - | }
|
583 - | impl CapturingPayload {
|
584 - | /// Creates a new builder-style object to manufacture [`CapturingPayload`](crate::model::CapturingPayload).
|
585 - | pub fn builder() -> crate::model::capturing_payload::Builder {
|
586 - | crate::model::capturing_payload::Builder::default()
|
663 + | /// A builder for [`CaptureEvent`](crate::model::CaptureEvent).
|
664 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
665 + | pub struct Builder {
|
666 + | pub(crate) name: ::std::option::Option<::std::string::String>,
|
667 + | pub(crate) captured: ::std::option::Option<bool>,
|
668 + | pub(crate) shiny: ::std::option::Option<bool>,
|
669 + | pub(crate) pokedex_update:
|
670 + | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
671 + | }
|
672 + | impl Builder {
|
673 + | #[allow(missing_docs)] // documentation missing in model
|
674 + | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
675 + | self.name = input;
|
676 + | self
|
677 + | }
|
678 + | #[allow(missing_docs)] // documentation missing in model
|
679 + | pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
|
680 + | self.captured = input;
|
681 + | self
|
682 + | }
|
683 + | #[allow(missing_docs)] // documentation missing in model
|
684 + | pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
|
685 + | self.shiny = input;
|
686 + | self
|
687 + | }
|
688 + | #[allow(missing_docs)] // documentation missing in model
|
689 + | pub fn pokedex_update(
|
690 + | mut self,
|
691 + | input: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
692 + | ) -> Self {
|
693 + | self.pokedex_update = input;
|
694 + | self
|
695 + | }
|
696 + | /// Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
|
697 + | pub fn build(self) -> crate::model::CaptureEvent {
|
698 + | self.build_enforcing_required_and_enum_traits()
|
699 + | }
|
700 + | fn build_enforcing_required_and_enum_traits(self) -> crate::model::CaptureEvent {
|
701 + | crate::model::CaptureEvent {
|
702 + | name: self.name,
|
703 + | captured: self.captured,
|
704 + | shiny: self.shiny,
|
705 + | pokedex_update: self.pokedex_update,
|
706 + | }
|
707 + | }
|
587 708 | }
|
588 709 | }
|
589 710 | /// See [`ValidationExceptionField`](crate::model::ValidationExceptionField).
|
590 711 | pub mod validation_exception_field {
|
591 712 |
|
592 713 | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
593 714 | /// Holds one variant for each of the ways the builder can fail.
|
594 715 | #[allow(clippy::enum_variant_names)]
|
595 716 | pub enum ConstraintViolation {
|
596 717 | /// `path` was not provided but it is required when building `ValidationExceptionField`.
|
711 832 | ) -> Result<crate::model::FlavorText, ConstraintViolation> {
|
712 833 | Ok(crate::model::FlavorText {
|
713 834 | flavor_text: self
|
714 835 | .flavor_text
|
715 836 | .ok_or(ConstraintViolation::MissingFlavorText)?,
|
716 837 | language: self.language.ok_or(ConstraintViolation::MissingLanguage)?,
|
717 838 | })
|
718 839 | }
|
719 840 | }
|
720 841 | }
|
721 - | /// See [`CaptureEvent`](crate::model::CaptureEvent).
|
722 - | pub mod capture_event {
|
723 - |
|
724 - | impl ::std::convert::From<Builder> for crate::model::CaptureEvent {
|
725 - | fn from(builder: Builder) -> Self {
|
726 - | builder.build()
|
727 - | }
|
728 - | }
|
729 - | /// A builder for [`CaptureEvent`](crate::model::CaptureEvent).
|
730 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
731 - | pub struct Builder {
|
732 - | pub(crate) name: ::std::option::Option<::std::string::String>,
|
733 - | pub(crate) captured: ::std::option::Option<bool>,
|
734 - | pub(crate) shiny: ::std::option::Option<bool>,
|
735 - | pub(crate) pokedex_update:
|
736 - | ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
737 - | }
|
738 - | impl Builder {
|
739 - | #[allow(missing_docs)] // documentation missing in model
|
740 - | pub fn name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
741 - | self.name = input;
|
742 - | self
|
743 - | }
|
744 - | #[allow(missing_docs)] // documentation missing in model
|
745 - | pub fn captured(mut self, input: ::std::option::Option<bool>) -> Self {
|
746 - | self.captured = input;
|
747 - | self
|
748 - | }
|
749 - | #[allow(missing_docs)] // documentation missing in model
|
750 - | pub fn shiny(mut self, input: ::std::option::Option<bool>) -> Self {
|
751 - | self.shiny = input;
|
752 - | self
|
753 - | }
|
754 - | #[allow(missing_docs)] // documentation missing in model
|
755 - | pub fn pokedex_update(
|
756 - | mut self,
|
757 - | input: ::std::option::Option<::aws_smithy_http_server_python::types::Blob>,
|
758 - | ) -> Self {
|
759 - | self.pokedex_update = input;
|
760 - | self
|
761 - | }
|
762 - | /// Consumes the builder and constructs a [`CaptureEvent`](crate::model::CaptureEvent).
|
763 - | pub fn build(self) -> crate::model::CaptureEvent {
|
764 - | self.build_enforcing_required_and_enum_traits()
|
765 - | }
|
766 - | fn build_enforcing_required_and_enum_traits(self) -> crate::model::CaptureEvent {
|
767 - | crate::model::CaptureEvent {
|
768 - | name: self.name,
|
769 - | captured: self.captured,
|
770 - | shiny: self.shiny,
|
771 - | pokedex_update: self.pokedex_update,
|
772 - | }
|
773 - | }
|
774 - | }
|
775 - | }
|
776 - | /// See [`CapturingEvent`](crate::model::CapturingEvent).
|
777 - | pub(crate) mod capturing_event_internal {
|
778 - |
|
779 - | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
780 - | fn from(builder: Builder) -> Self {
|
781 - | builder.build()
|
782 - | }
|
783 - | }
|
784 - | /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
785 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
786 - | pub(crate) struct Builder {
|
787 - | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
788 - | }
|
789 - | impl Builder {
|
790 - | #[allow(missing_docs)] // documentation missing in model
|
791 - | pub(crate) fn set_payload(
|
792 - | mut self,
|
793 - | input: Option<impl ::std::convert::Into<crate::model::CapturingPayload>>,
|
794 - | ) -> Self {
|
795 - | self.payload = input.map(|v| v.into());
|
796 - | self
|
797 - | }
|
798 - | /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
799 - | pub fn build(self) -> crate::model::CapturingEvent {
|
800 - | self.build_enforcing_all_constraints()
|
801 - | }
|
802 - | fn build_enforcing_all_constraints(self) -> crate::model::CapturingEvent {
|
803 - | crate::model::CapturingEvent {
|
804 - | payload: self.payload,
|
805 - | }
|
806 - | }
|
807 - | }
|
808 - | }
|
809 - | /// See [`CapturingEvent`](crate::model::CapturingEvent).
|
810 - | pub mod capturing_event {
|
811 - |
|
812 - | impl ::std::convert::From<Builder> for crate::model::CapturingEvent {
|
813 - | fn from(builder: Builder) -> Self {
|
814 - | builder.build()
|
815 - | }
|
816 - | }
|
817 - | /// A builder for [`CapturingEvent`](crate::model::CapturingEvent).
|
818 - | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
819 - | pub struct Builder {
|
820 - | pub(crate) payload: ::std::option::Option<crate::model::CapturingPayload>,
|
821 - | }
|
822 - | impl Builder {
|
823 - | #[allow(missing_docs)] // documentation missing in model
|
824 - | pub fn payload(
|
825 - | mut self,
|
826 - | input: ::std::option::Option<crate::model::CapturingPayload>,
|
827 - | ) -> Self {
|
828 - | self.payload = input;
|
829 - | self
|
830 - | }
|
831 - | /// Consumes the builder and constructs a [`CapturingEvent`](crate::model::CapturingEvent).
|
832 - | pub fn build(self) -> crate::model::CapturingEvent {
|
833 - | self.build_enforcing_required_and_enum_traits()
|
834 - | }
|
835 - | fn build_enforcing_required_and_enum_traits(self) -> crate::model::CapturingEvent {
|
836 - | crate::model::CapturingEvent {
|
837 - | payload: self.payload,
|
838 - | }
|
839 - | }
|
840 - | }
|
841 - | }
|
842 842 | /// See [`CapturingPayload`](crate::model::CapturingPayload).
|
843 843 | pub(crate) mod capturing_payload_internal {
|
844 844 |
|
845 845 | impl ::std::convert::From<Builder> for crate::model::CapturingPayload {
|
846 846 | fn from(builder: Builder) -> Self {
|
847 847 | builder.build()
|
848 848 | }
|
849 849 | }
|
850 850 | /// A builder for [`CapturingPayload`](crate::model::CapturingPayload).
|
851 851 | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|