rivet_client_api_chat/
operation.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2/// Operation shape for `GetDirectThread`.
3///
4/// This is usually constructed for you using the the fluent builder returned by
5/// [`get_direct_thread`](crate::client::Client::get_direct_thread).
6///
7/// See [`crate::client::fluent_builders::GetDirectThread`] for more details about the operation.
8#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
9pub struct GetDirectThread {
10	_private: (),
11}
12impl GetDirectThread {
13	/// Creates a new builder-style object to manufacture [`GetDirectThreadInput`](crate::input::GetDirectThreadInput)
14	pub fn builder() -> crate::input::get_direct_thread_input::Builder {
15		crate::input::get_direct_thread_input::Builder::default()
16	}
17	/// Creates a new `GetDirectThread` operation.
18	pub fn new() -> Self {
19		Self { _private: () }
20	}
21}
22impl aws_smithy_http::response::ParseStrictResponse for GetDirectThread {
23	type Output = std::result::Result<
24		crate::output::GetDirectThreadOutput,
25		crate::error::GetDirectThreadError,
26	>;
27	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
28		if !response.status().is_success() && response.status().as_u16() != 200 {
29			crate::operation_deser::parse_get_direct_thread_error(response)
30		} else {
31			crate::operation_deser::parse_get_direct_thread_response(response)
32		}
33	}
34}
35
36/// Operation shape for `GetThreadHistory`.
37///
38/// This is usually constructed for you using the the fluent builder returned by
39/// [`get_thread_history`](crate::client::Client::get_thread_history).
40///
41/// See [`crate::client::fluent_builders::GetThreadHistory`] for more details about the operation.
42#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
43pub struct GetThreadHistory {
44	_private: (),
45}
46impl GetThreadHistory {
47	/// Creates a new builder-style object to manufacture [`GetThreadHistoryInput`](crate::input::GetThreadHistoryInput)
48	pub fn builder() -> crate::input::get_thread_history_input::Builder {
49		crate::input::get_thread_history_input::Builder::default()
50	}
51	/// Creates a new `GetThreadHistory` operation.
52	pub fn new() -> Self {
53		Self { _private: () }
54	}
55}
56impl aws_smithy_http::response::ParseStrictResponse for GetThreadHistory {
57	type Output = std::result::Result<
58		crate::output::GetThreadHistoryOutput,
59		crate::error::GetThreadHistoryError,
60	>;
61	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
62		if !response.status().is_success() && response.status().as_u16() != 200 {
63			crate::operation_deser::parse_get_thread_history_error(response)
64		} else {
65			crate::operation_deser::parse_get_thread_history_response(response)
66		}
67	}
68}
69
70/// Operation shape for `GetThreadTopic`.
71///
72/// This is usually constructed for you using the the fluent builder returned by
73/// [`get_thread_topic`](crate::client::Client::get_thread_topic).
74///
75/// See [`crate::client::fluent_builders::GetThreadTopic`] for more details about the operation.
76#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
77pub struct GetThreadTopic {
78	_private: (),
79}
80impl GetThreadTopic {
81	/// Creates a new builder-style object to manufacture [`GetThreadTopicInput`](crate::input::GetThreadTopicInput)
82	pub fn builder() -> crate::input::get_thread_topic_input::Builder {
83		crate::input::get_thread_topic_input::Builder::default()
84	}
85	/// Creates a new `GetThreadTopic` operation.
86	pub fn new() -> Self {
87		Self { _private: () }
88	}
89}
90impl aws_smithy_http::response::ParseStrictResponse for GetThreadTopic {
91	type Output =
92		std::result::Result<crate::output::GetThreadTopicOutput, crate::error::GetThreadTopicError>;
93	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
94		if !response.status().is_success() && response.status().as_u16() != 200 {
95			crate::operation_deser::parse_get_thread_topic_error(response)
96		} else {
97			crate::operation_deser::parse_get_thread_topic_response(response)
98		}
99	}
100}
101
102/// Operation shape for `SendChatMessage`.
103///
104/// This is usually constructed for you using the the fluent builder returned by
105/// [`send_chat_message`](crate::client::Client::send_chat_message).
106///
107/// See [`crate::client::fluent_builders::SendChatMessage`] for more details about the operation.
108#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
109pub struct SendChatMessage {
110	_private: (),
111}
112impl SendChatMessage {
113	/// Creates a new builder-style object to manufacture [`SendChatMessageInput`](crate::input::SendChatMessageInput)
114	pub fn builder() -> crate::input::send_chat_message_input::Builder {
115		crate::input::send_chat_message_input::Builder::default()
116	}
117	/// Creates a new `SendChatMessage` operation.
118	pub fn new() -> Self {
119		Self { _private: () }
120	}
121}
122impl aws_smithy_http::response::ParseStrictResponse for SendChatMessage {
123	type Output = std::result::Result<
124		crate::output::SendChatMessageOutput,
125		crate::error::SendChatMessageError,
126	>;
127	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
128		if !response.status().is_success() && response.status().as_u16() != 200 {
129			crate::operation_deser::parse_send_chat_message_error(response)
130		} else {
131			crate::operation_deser::parse_send_chat_message_response(response)
132		}
133	}
134}
135
136/// Operation shape for `SetThreadRead`.
137///
138/// This is usually constructed for you using the the fluent builder returned by
139/// [`set_thread_read`](crate::client::Client::set_thread_read).
140///
141/// See [`crate::client::fluent_builders::SetThreadRead`] for more details about the operation.
142#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
143pub struct SetThreadRead {
144	_private: (),
145}
146impl SetThreadRead {
147	/// Creates a new builder-style object to manufacture [`SetThreadReadInput`](crate::input::SetThreadReadInput)
148	pub fn builder() -> crate::input::set_thread_read_input::Builder {
149		crate::input::set_thread_read_input::Builder::default()
150	}
151	/// Creates a new `SetThreadRead` operation.
152	pub fn new() -> Self {
153		Self { _private: () }
154	}
155}
156impl aws_smithy_http::response::ParseStrictResponse for SetThreadRead {
157	type Output =
158		std::result::Result<crate::output::SetThreadReadOutput, crate::error::SetThreadReadError>;
159	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
160		if !response.status().is_success() && response.status().as_u16() != 200 {
161			crate::operation_deser::parse_set_thread_read_error(response)
162		} else {
163			crate::operation_deser::parse_set_thread_read_response(response)
164		}
165	}
166}
167
168/// Operation shape for `SetTypingStatus`.
169///
170/// This is usually constructed for you using the the fluent builder returned by
171/// [`set_typing_status`](crate::client::Client::set_typing_status).
172///
173/// See [`crate::client::fluent_builders::SetTypingStatus`] for more details about the operation.
174#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
175pub struct SetTypingStatus {
176	_private: (),
177}
178impl SetTypingStatus {
179	/// Creates a new builder-style object to manufacture [`SetTypingStatusInput`](crate::input::SetTypingStatusInput)
180	pub fn builder() -> crate::input::set_typing_status_input::Builder {
181		crate::input::set_typing_status_input::Builder::default()
182	}
183	/// Creates a new `SetTypingStatus` operation.
184	pub fn new() -> Self {
185		Self { _private: () }
186	}
187}
188impl aws_smithy_http::response::ParseStrictResponse for SetTypingStatus {
189	type Output = std::result::Result<
190		crate::output::SetTypingStatusOutput,
191		crate::error::SetTypingStatusError,
192	>;
193	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
194		if !response.status().is_success() && response.status().as_u16() != 200 {
195			crate::operation_deser::parse_set_typing_status_error(response)
196		} else {
197			crate::operation_deser::parse_set_typing_status_response(response)
198		}
199	}
200}
201
202/// Operation shape for `WatchThread`.
203///
204/// This is usually constructed for you using the the fluent builder returned by
205/// [`watch_thread`](crate::client::Client::watch_thread).
206///
207/// See [`crate::client::fluent_builders::WatchThread`] for more details about the operation.
208#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
209pub struct WatchThread {
210	_private: (),
211}
212impl WatchThread {
213	/// Creates a new builder-style object to manufacture [`WatchThreadInput`](crate::input::WatchThreadInput)
214	pub fn builder() -> crate::input::watch_thread_input::Builder {
215		crate::input::watch_thread_input::Builder::default()
216	}
217	/// Creates a new `WatchThread` operation.
218	pub fn new() -> Self {
219		Self { _private: () }
220	}
221}
222impl aws_smithy_http::response::ParseStrictResponse for WatchThread {
223	type Output =
224		std::result::Result<crate::output::WatchThreadOutput, crate::error::WatchThreadError>;
225	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
226		if !response.status().is_success() && response.status().as_u16() != 200 {
227			crate::operation_deser::parse_watch_thread_error(response)
228		} else {
229			crate::operation_deser::parse_watch_thread_response(response)
230		}
231	}
232}