1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + | #[allow(missing_docs)] // documentation missing in model
|
3 + | #[derive(
|
4 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
5 + | )]
|
6 + | pub struct CheckHealthOutput {}
|
7 + | impl CheckHealthOutput {
|
8 + | /// Creates a new builder-style object to manufacture [`CheckHealthOutput`](crate::output::CheckHealthOutput).
|
9 + | pub fn builder() -> crate::output::check_health_output::Builder {
|
10 + | crate::output::check_health_output::Builder::default()
|
11 + | }
|
12 + | }
|
13 + |
|
14 + | #[allow(missing_docs)] // documentation missing in model
|
15 + | #[derive(::std::fmt::Debug)]
|
16 + | pub struct CapturePokemonOutput {
|
17 + | #[allow(missing_docs)] // documentation missing in model
|
18 + | pub events: ::aws_smithy_legacy_http::event_stream::EventStreamSender<
|
19 + | crate::model::CapturePokemonEvents,
|
20 + | crate::error::CapturePokemonEventsError,
|
21 + | >,
|
22 + | }
|
23 + | impl CapturePokemonOutput {
|
24 + | #[allow(missing_docs)] // documentation missing in model
|
25 + | pub fn events(
|
26 + | &self,
|
27 + | ) -> &::aws_smithy_legacy_http::event_stream::EventStreamSender<
|
28 + | crate::model::CapturePokemonEvents,
|
29 + | crate::error::CapturePokemonEventsError,
|
30 + | > {
|
31 + | &self.events
|
32 + | }
|
33 + | }
|
34 + | impl CapturePokemonOutput {
|
35 + | /// Creates a new builder-style object to manufacture [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
|
36 + | pub fn builder() -> crate::output::capture_pokemon_output::Builder {
|
37 + | crate::output::capture_pokemon_output::Builder::default()
|
38 + | }
|
39 + | }
|
40 + |
|
41 + | #[allow(missing_docs)] // documentation missing in model
|
42 + | #[derive(
|
43 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
44 + | )]
|
45 + | pub struct DoNothingOutput {}
|
46 + | impl DoNothingOutput {
|
47 + | /// Creates a new builder-style object to manufacture [`DoNothingOutput`](crate::output::DoNothingOutput).
|
48 + | pub fn builder() -> crate::output::do_nothing_output::Builder {
|
49 + | crate::output::do_nothing_output::Builder::default()
|
50 + | }
|
51 + | }
|
52 + |
|
53 + | #[allow(missing_docs)] // documentation missing in model
|
54 + | #[derive(
|
55 + | ::std::clone::Clone, ::std::cmp::Eq, ::std::cmp::PartialEq, ::std::fmt::Debug, ::std::hash::Hash,
|
56 + | )]
|
57 + | pub struct GetServerStatisticsOutput {
|
58 + | /// The number of calls executed by the server.
|
59 + | pub calls_count: i64,
|
60 + | }
|
61 + | impl GetServerStatisticsOutput {
|
62 + | /// The number of calls executed by the server.
|
63 + | pub fn calls_count(&self) -> i64 {
|
64 + | self.calls_count
|
65 + | }
|
66 + | }
|
67 + | impl GetServerStatisticsOutput {
|
68 + | /// Creates a new builder-style object to manufacture [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
|
69 + | pub fn builder() -> crate::output::get_server_statistics_output::Builder {
|
70 + | crate::output::get_server_statistics_output::Builder::default()
|
71 + | }
|
72 + | }
|
73 + | /// See [`CheckHealthOutput`](crate::output::CheckHealthOutput).
|
74 + | pub mod check_health_output {
|
75 + |
|
76 + | impl ::std::convert::From<Builder> for crate::output::CheckHealthOutput {
|
77 + | fn from(builder: Builder) -> Self {
|
78 + | builder.build()
|
79 + | }
|
80 + | }
|
81 + | /// A builder for [`CheckHealthOutput`](crate::output::CheckHealthOutput).
|
82 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
83 + | pub struct Builder {}
|
84 + | impl Builder {
|
85 + | /// Consumes the builder and constructs a [`CheckHealthOutput`](crate::output::CheckHealthOutput).
|
86 + | pub fn build(self) -> crate::output::CheckHealthOutput {
|
87 + | self.build_enforcing_all_constraints()
|
88 + | }
|
89 + | fn build_enforcing_all_constraints(self) -> crate::output::CheckHealthOutput {
|
90 + | crate::output::CheckHealthOutput {}
|
91 + | }
|
92 + | }
|
93 + | }
|
94 + | /// See [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
|
95 + | pub mod capture_pokemon_output {
|
96 + |
|
97 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
98 + | /// Holds one variant for each of the ways the builder can fail.
|
99 + | #[non_exhaustive]
|
100 + | #[allow(clippy::enum_variant_names)]
|
101 + | pub enum ConstraintViolation {
|
102 + | /// `events` was not provided but it is required when building `CapturePokemonOutput`.
|
103 + | MissingEvents,
|
104 + | }
|
105 + | impl ::std::fmt::Display for ConstraintViolation {
|
106 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
107 + | match self {
|
108 + | ConstraintViolation::MissingEvents => write!(f, "`events` was not provided but it is required when building `CapturePokemonOutput`"),
|
109 + | }
|
110 + | }
|
111 + | }
|
112 + | impl ::std::error::Error for ConstraintViolation {}
|
113 + | impl ::std::convert::TryFrom<Builder> for crate::output::CapturePokemonOutput {
|
114 + | type Error = ConstraintViolation;
|
115 + |
|
116 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
117 + | builder.build()
|
118 + | }
|
119 + | }
|
120 + | /// A builder for [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
|
121 + | #[derive(::std::default::Default, ::std::fmt::Debug)]
|
122 + | pub struct Builder {
|
123 + | pub(crate) events: ::std::option::Option<
|
124 + | ::aws_smithy_legacy_http::event_stream::EventStreamSender<
|
125 + | crate::model::CapturePokemonEvents,
|
126 + | crate::error::CapturePokemonEventsError,
|
127 + | >,
|
128 + | >,
|
129 + | }
|
130 + | impl Builder {
|
131 + | #[allow(missing_docs)] // documentation missing in model
|
132 + | pub fn events(
|
133 + | mut self,
|
134 + | input: ::aws_smithy_legacy_http::event_stream::EventStreamSender<
|
135 + | crate::model::CapturePokemonEvents,
|
136 + | crate::error::CapturePokemonEventsError,
|
137 + | >,
|
138 + | ) -> Self {
|
139 + | self.events = Some(input);
|
140 + | self
|
141 + | }
|
142 + | /// Consumes the builder and constructs a [`CapturePokemonOutput`](crate::output::CapturePokemonOutput).
|
143 + | ///
|
144 + | /// The builder fails to construct a [`CapturePokemonOutput`](crate::output::CapturePokemonOutput) if a [`ConstraintViolation`] occurs.
|
145 + | ///
|
146 + | pub fn build(self) -> Result<crate::output::CapturePokemonOutput, ConstraintViolation> {
|
147 + | self.build_enforcing_all_constraints()
|
148 + | }
|
149 + | fn build_enforcing_all_constraints(
|
150 + | self,
|
151 + | ) -> Result<crate::output::CapturePokemonOutput, ConstraintViolation> {
|
152 + | Ok(crate::output::CapturePokemonOutput {
|
153 + | events: self.events.ok_or(ConstraintViolation::MissingEvents)?,
|
154 + | })
|
155 + | }
|
156 + | }
|
157 + | }
|
158 + | /// See [`DoNothingOutput`](crate::output::DoNothingOutput).
|
159 + | pub mod do_nothing_output {
|
160 + |
|
161 + | impl ::std::convert::From<Builder> for crate::output::DoNothingOutput {
|
162 + | fn from(builder: Builder) -> Self {
|
163 + | builder.build()
|
164 + | }
|
165 + | }
|
166 + | /// A builder for [`DoNothingOutput`](crate::output::DoNothingOutput).
|
167 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
168 + | pub struct Builder {}
|
169 + | impl Builder {
|
170 + | /// Consumes the builder and constructs a [`DoNothingOutput`](crate::output::DoNothingOutput).
|
171 + | pub fn build(self) -> crate::output::DoNothingOutput {
|
172 + | self.build_enforcing_all_constraints()
|
173 + | }
|
174 + | fn build_enforcing_all_constraints(self) -> crate::output::DoNothingOutput {
|
175 + | crate::output::DoNothingOutput {}
|
176 + | }
|
177 + | }
|
178 + | }
|
179 + | /// See [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
|
180 + | pub mod get_server_statistics_output {
|
181 + |
|
182 + | #[derive(::std::cmp::PartialEq, ::std::fmt::Debug)]
|
183 + | /// Holds one variant for each of the ways the builder can fail.
|
184 + | #[non_exhaustive]
|
185 + | #[allow(clippy::enum_variant_names)]
|
186 + | pub enum ConstraintViolation {
|
187 + | /// `calls_count` was not provided but it is required when building `GetServerStatisticsOutput`.
|
188 + | MissingCallsCount,
|
189 + | }
|
190 + | impl ::std::fmt::Display for ConstraintViolation {
|
191 + | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
192 + | match self {
|
193 + | ConstraintViolation::MissingCallsCount => write!(f, "`calls_count` was not provided but it is required when building `GetServerStatisticsOutput`"),
|
194 + | }
|
195 + | }
|
196 + | }
|
197 + | impl ::std::error::Error for ConstraintViolation {}
|
198 + | impl ::std::convert::TryFrom<Builder> for crate::output::GetServerStatisticsOutput {
|
199 + | type Error = ConstraintViolation;
|
200 + |
|
201 + | fn try_from(builder: Builder) -> ::std::result::Result<Self, Self::Error> {
|
202 + | builder.build()
|
203 + | }
|
204 + | }
|
205 + | /// A builder for [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
|
206 + | #[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
|
207 + | pub struct Builder {
|
208 + | pub(crate) calls_count: ::std::option::Option<i64>,
|
209 + | }
|
210 + | impl Builder {
|
211 + | /// The number of calls executed by the server.
|
212 + | pub fn calls_count(mut self, input: i64) -> Self {
|
213 + | self.calls_count = Some(input);
|
214 + | self
|
215 + | }
|
216 + | /// Consumes the builder and constructs a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput).
|
217 + | ///
|
218 + | /// The builder fails to construct a [`GetServerStatisticsOutput`](crate::output::GetServerStatisticsOutput) if a [`ConstraintViolation`] occurs.
|
219 + | ///
|
220 + | pub fn build(
|
221 + | self,
|
222 + | ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
|
223 + | self.build_enforcing_all_constraints()
|
224 + | }
|
225 + | fn build_enforcing_all_constraints(
|
226 + | self,
|
227 + | ) -> Result<crate::output::GetServerStatisticsOutput, ConstraintViolation> {
|
228 + | Ok(crate::output::GetServerStatisticsOutput {
|
229 + | calls_count: self
|
230 + | .calls_count
|
231 + | .ok_or(ConstraintViolation::MissingCallsCount)?,
|
232 + | })
|
233 + | }
|
234 + | }
|
235 + | }
|