rivet-chat 0.0.7

Rivet service enabling identities to send and receive chat messages
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Operation shape for `GetDirectThread`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_direct_thread`](crate::client::Client::get_direct_thread).
///
/// See [`crate::client::fluent_builders::GetDirectThread`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct GetDirectThread {
	_private: (),
}
impl GetDirectThread {
	/// Creates a new builder-style object to manufacture [`GetDirectThreadInput`](crate::input::GetDirectThreadInput)
	pub fn builder() -> crate::input::get_direct_thread_input::Builder {
		crate::input::get_direct_thread_input::Builder::default()
	}
	/// Creates a new `GetDirectThread` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for GetDirectThread {
	type Output = std::result::Result<
		crate::output::GetDirectThreadOutput,
		crate::error::GetDirectThreadError,
	>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_get_direct_thread_error(response)
		} else {
			crate::operation_deser::parse_get_direct_thread_response(response)
		}
	}
}

/// Operation shape for `GetThreadHistory`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_thread_history`](crate::client::Client::get_thread_history).
///
/// See [`crate::client::fluent_builders::GetThreadHistory`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct GetThreadHistory {
	_private: (),
}
impl GetThreadHistory {
	/// Creates a new builder-style object to manufacture [`GetThreadHistoryInput`](crate::input::GetThreadHistoryInput)
	pub fn builder() -> crate::input::get_thread_history_input::Builder {
		crate::input::get_thread_history_input::Builder::default()
	}
	/// Creates a new `GetThreadHistory` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for GetThreadHistory {
	type Output = std::result::Result<
		crate::output::GetThreadHistoryOutput,
		crate::error::GetThreadHistoryError,
	>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_get_thread_history_error(response)
		} else {
			crate::operation_deser::parse_get_thread_history_response(response)
		}
	}
}

/// Operation shape for `GetThreadTopic`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_thread_topic`](crate::client::Client::get_thread_topic).
///
/// See [`crate::client::fluent_builders::GetThreadTopic`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct GetThreadTopic {
	_private: (),
}
impl GetThreadTopic {
	/// Creates a new builder-style object to manufacture [`GetThreadTopicInput`](crate::input::GetThreadTopicInput)
	pub fn builder() -> crate::input::get_thread_topic_input::Builder {
		crate::input::get_thread_topic_input::Builder::default()
	}
	/// Creates a new `GetThreadTopic` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for GetThreadTopic {
	type Output =
		std::result::Result<crate::output::GetThreadTopicOutput, crate::error::GetThreadTopicError>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_get_thread_topic_error(response)
		} else {
			crate::operation_deser::parse_get_thread_topic_response(response)
		}
	}
}

/// Operation shape for `SendChatMessage`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`send_chat_message`](crate::client::Client::send_chat_message).
///
/// See [`crate::client::fluent_builders::SendChatMessage`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct SendChatMessage {
	_private: (),
}
impl SendChatMessage {
	/// Creates a new builder-style object to manufacture [`SendChatMessageInput`](crate::input::SendChatMessageInput)
	pub fn builder() -> crate::input::send_chat_message_input::Builder {
		crate::input::send_chat_message_input::Builder::default()
	}
	/// Creates a new `SendChatMessage` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for SendChatMessage {
	type Output = std::result::Result<
		crate::output::SendChatMessageOutput,
		crate::error::SendChatMessageError,
	>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_send_chat_message_error(response)
		} else {
			crate::operation_deser::parse_send_chat_message_response(response)
		}
	}
}

/// Operation shape for `SetThreadRead`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`set_thread_read`](crate::client::Client::set_thread_read).
///
/// See [`crate::client::fluent_builders::SetThreadRead`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct SetThreadRead {
	_private: (),
}
impl SetThreadRead {
	/// Creates a new builder-style object to manufacture [`SetThreadReadInput`](crate::input::SetThreadReadInput)
	pub fn builder() -> crate::input::set_thread_read_input::Builder {
		crate::input::set_thread_read_input::Builder::default()
	}
	/// Creates a new `SetThreadRead` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for SetThreadRead {
	type Output =
		std::result::Result<crate::output::SetThreadReadOutput, crate::error::SetThreadReadError>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_set_thread_read_error(response)
		} else {
			crate::operation_deser::parse_set_thread_read_response(response)
		}
	}
}

/// Operation shape for `SetTypingStatus`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`set_typing_status`](crate::client::Client::set_typing_status).
///
/// See [`crate::client::fluent_builders::SetTypingStatus`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct SetTypingStatus {
	_private: (),
}
impl SetTypingStatus {
	/// Creates a new builder-style object to manufacture [`SetTypingStatusInput`](crate::input::SetTypingStatusInput)
	pub fn builder() -> crate::input::set_typing_status_input::Builder {
		crate::input::set_typing_status_input::Builder::default()
	}
	/// Creates a new `SetTypingStatus` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for SetTypingStatus {
	type Output = std::result::Result<
		crate::output::SetTypingStatusOutput,
		crate::error::SetTypingStatusError,
	>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_set_typing_status_error(response)
		} else {
			crate::operation_deser::parse_set_typing_status_response(response)
		}
	}
}

/// Operation shape for `WatchThread`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`watch_thread`](crate::client::Client::watch_thread).
///
/// See [`crate::client::fluent_builders::WatchThread`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct WatchThread {
	_private: (),
}
impl WatchThread {
	/// Creates a new builder-style object to manufacture [`WatchThreadInput`](crate::input::WatchThreadInput)
	pub fn builder() -> crate::input::watch_thread_input::Builder {
		crate::input::watch_thread_input::Builder::default()
	}
	/// Creates a new `WatchThread` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for WatchThread {
	type Output =
		std::result::Result<crate::output::WatchThreadOutput, crate::error::WatchThreadError>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_watch_thread_error(response)
		} else {
			crate::operation_deser::parse_watch_thread_response(response)
		}
	}
}