rivet_matchmaker/
operation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Operation shape for `FindLobby`.
3///
4/// This is usually constructed for you using the the fluent builder returned by
5/// [`find_lobby`](crate::client::Client::find_lobby).
6///
7/// See [`crate::client::fluent_builders::FindLobby`] for more details about the operation.
8#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
9pub struct FindLobby {
10	_private: (),
11}
12impl FindLobby {
13	/// Creates a new builder-style object to manufacture [`FindLobbyInput`](crate::input::FindLobbyInput)
14	pub fn builder() -> crate::input::find_lobby_input::Builder {
15		crate::input::find_lobby_input::Builder::default()
16	}
17	/// Creates a new `FindLobby` operation.
18	pub fn new() -> Self {
19		Self { _private: () }
20	}
21}
22impl aws_smithy_http::response::ParseStrictResponse for FindLobby {
23	type Output = std::result::Result<crate::output::FindLobbyOutput, crate::error::FindLobbyError>;
24	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
25		if !response.status().is_success() && response.status().as_u16() != 200 {
26			crate::operation_deser::parse_find_lobby_error(response)
27		} else {
28			crate::operation_deser::parse_find_lobby_response(response)
29		}
30	}
31}
32
33/// Operation shape for `JoinLobby`.
34///
35/// This is usually constructed for you using the the fluent builder returned by
36/// [`join_lobby`](crate::client::Client::join_lobby).
37///
38/// See [`crate::client::fluent_builders::JoinLobby`] for more details about the operation.
39#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
40pub struct JoinLobby {
41	_private: (),
42}
43impl JoinLobby {
44	/// Creates a new builder-style object to manufacture [`JoinLobbyInput`](crate::input::JoinLobbyInput)
45	pub fn builder() -> crate::input::join_lobby_input::Builder {
46		crate::input::join_lobby_input::Builder::default()
47	}
48	/// Creates a new `JoinLobby` operation.
49	pub fn new() -> Self {
50		Self { _private: () }
51	}
52}
53impl aws_smithy_http::response::ParseStrictResponse for JoinLobby {
54	type Output = std::result::Result<crate::output::JoinLobbyOutput, crate::error::JoinLobbyError>;
55	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
56		if !response.status().is_success() && response.status().as_u16() != 200 {
57			crate::operation_deser::parse_join_lobby_error(response)
58		} else {
59			crate::operation_deser::parse_join_lobby_response(response)
60		}
61	}
62}
63
64/// Operation shape for `ListLobbies`.
65///
66/// This is usually constructed for you using the the fluent builder returned by
67/// [`list_lobbies`](crate::client::Client::list_lobbies).
68///
69/// See [`crate::client::fluent_builders::ListLobbies`] for more details about the operation.
70#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
71pub struct ListLobbies {
72	_private: (),
73}
74impl ListLobbies {
75	/// Creates a new builder-style object to manufacture [`ListLobbiesInput`](crate::input::ListLobbiesInput)
76	pub fn builder() -> crate::input::list_lobbies_input::Builder {
77		crate::input::list_lobbies_input::Builder::default()
78	}
79	/// Creates a new `ListLobbies` operation.
80	pub fn new() -> Self {
81		Self { _private: () }
82	}
83}
84impl aws_smithy_http::response::ParseStrictResponse for ListLobbies {
85	type Output =
86		std::result::Result<crate::output::ListLobbiesOutput, crate::error::ListLobbiesError>;
87	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
88		if !response.status().is_success() && response.status().as_u16() != 200 {
89			crate::operation_deser::parse_list_lobbies_error(response)
90		} else {
91			crate::operation_deser::parse_list_lobbies_response(response)
92		}
93	}
94}
95
96/// Operation shape for `ListRegions`.
97///
98/// This is usually constructed for you using the the fluent builder returned by
99/// [`list_regions`](crate::client::Client::list_regions).
100///
101/// See [`crate::client::fluent_builders::ListRegions`] for more details about the operation.
102#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
103pub struct ListRegions {
104	_private: (),
105}
106impl ListRegions {
107	/// Creates a new builder-style object to manufacture [`ListRegionsInput`](crate::input::ListRegionsInput)
108	pub fn builder() -> crate::input::list_regions_input::Builder {
109		crate::input::list_regions_input::Builder::default()
110	}
111	/// Creates a new `ListRegions` operation.
112	pub fn new() -> Self {
113		Self { _private: () }
114	}
115}
116impl aws_smithy_http::response::ParseStrictResponse for ListRegions {
117	type Output =
118		std::result::Result<crate::output::ListRegionsOutput, crate::error::ListRegionsError>;
119	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
120		if !response.status().is_success() && response.status().as_u16() != 200 {
121			crate::operation_deser::parse_list_regions_error(response)
122		} else {
123			crate::operation_deser::parse_list_regions_response(response)
124		}
125	}
126}
127
128/// Operation shape for `LobbyReady`.
129///
130/// This is usually constructed for you using the the fluent builder returned by
131/// [`lobby_ready`](crate::client::Client::lobby_ready).
132///
133/// See [`crate::client::fluent_builders::LobbyReady`] for more details about the operation.
134#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
135pub struct LobbyReady {
136	_private: (),
137}
138impl LobbyReady {
139	/// Creates a new builder-style object to manufacture [`LobbyReadyInput`](crate::input::LobbyReadyInput)
140	pub fn builder() -> crate::input::lobby_ready_input::Builder {
141		crate::input::lobby_ready_input::Builder::default()
142	}
143	/// Creates a new `LobbyReady` operation.
144	pub fn new() -> Self {
145		Self { _private: () }
146	}
147}
148impl aws_smithy_http::response::ParseStrictResponse for LobbyReady {
149	type Output =
150		std::result::Result<crate::output::LobbyReadyOutput, crate::error::LobbyReadyError>;
151	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
152		if !response.status().is_success() && response.status().as_u16() != 200 {
153			crate::operation_deser::parse_lobby_ready_error(response)
154		} else {
155			crate::operation_deser::parse_lobby_ready_response(response)
156		}
157	}
158}
159
160/// Operation shape for `PlayerConnected`.
161///
162/// This is usually constructed for you using the the fluent builder returned by
163/// [`player_connected`](crate::client::Client::player_connected).
164///
165/// See [`crate::client::fluent_builders::PlayerConnected`] for more details about the operation.
166#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
167pub struct PlayerConnected {
168	_private: (),
169}
170impl PlayerConnected {
171	/// Creates a new builder-style object to manufacture [`PlayerConnectedInput`](crate::input::PlayerConnectedInput)
172	pub fn builder() -> crate::input::player_connected_input::Builder {
173		crate::input::player_connected_input::Builder::default()
174	}
175	/// Creates a new `PlayerConnected` operation.
176	pub fn new() -> Self {
177		Self { _private: () }
178	}
179}
180impl aws_smithy_http::response::ParseStrictResponse for PlayerConnected {
181	type Output = std::result::Result<
182		crate::output::PlayerConnectedOutput,
183		crate::error::PlayerConnectedError,
184	>;
185	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
186		if !response.status().is_success() && response.status().as_u16() != 200 {
187			crate::operation_deser::parse_player_connected_error(response)
188		} else {
189			crate::operation_deser::parse_player_connected_response(response)
190		}
191	}
192}
193
194/// Operation shape for `PlayerDisconnected`.
195///
196/// This is usually constructed for you using the the fluent builder returned by
197/// [`player_disconnected`](crate::client::Client::player_disconnected).
198///
199/// See [`crate::client::fluent_builders::PlayerDisconnected`] for more details about the operation.
200#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
201pub struct PlayerDisconnected {
202	_private: (),
203}
204impl PlayerDisconnected {
205	/// Creates a new builder-style object to manufacture [`PlayerDisconnectedInput`](crate::input::PlayerDisconnectedInput)
206	pub fn builder() -> crate::input::player_disconnected_input::Builder {
207		crate::input::player_disconnected_input::Builder::default()
208	}
209	/// Creates a new `PlayerDisconnected` operation.
210	pub fn new() -> Self {
211		Self { _private: () }
212	}
213}
214impl aws_smithy_http::response::ParseStrictResponse for PlayerDisconnected {
215	type Output = std::result::Result<
216		crate::output::PlayerDisconnectedOutput,
217		crate::error::PlayerDisconnectedError,
218	>;
219	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
220		if !response.status().is_success() && response.status().as_u16() != 200 {
221			crate::operation_deser::parse_player_disconnected_error(response)
222		} else {
223			crate::operation_deser::parse_player_disconnected_response(response)
224		}
225	}
226}
227
228/// Operation shape for `SetLobbyClosed`.
229///
230/// This is usually constructed for you using the the fluent builder returned by
231/// [`set_lobby_closed`](crate::client::Client::set_lobby_closed).
232///
233/// See [`crate::client::fluent_builders::SetLobbyClosed`] for more details about the operation.
234#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
235pub struct SetLobbyClosed {
236	_private: (),
237}
238impl SetLobbyClosed {
239	/// Creates a new builder-style object to manufacture [`SetLobbyClosedInput`](crate::input::SetLobbyClosedInput)
240	pub fn builder() -> crate::input::set_lobby_closed_input::Builder {
241		crate::input::set_lobby_closed_input::Builder::default()
242	}
243	/// Creates a new `SetLobbyClosed` operation.
244	pub fn new() -> Self {
245		Self { _private: () }
246	}
247}
248impl aws_smithy_http::response::ParseStrictResponse for SetLobbyClosed {
249	type Output =
250		std::result::Result<crate::output::SetLobbyClosedOutput, crate::error::SetLobbyClosedError>;
251	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
252		if !response.status().is_success() && response.status().as_u16() != 200 {
253			crate::operation_deser::parse_set_lobby_closed_error(response)
254		} else {
255			crate::operation_deser::parse_set_lobby_closed_response(response)
256		}
257	}
258}