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