rivet-kv 0.0.8

Rivet service for interacting with the key-value database
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Operation shape for `Delete`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`delete`](crate::client::Client::delete).
///
/// See [`crate::client::fluent_builders::Delete`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct Delete {
	_private: (),
}
impl Delete {
	/// Creates a new builder-style object to manufacture [`DeleteInput`](crate::input::DeleteInput)
	pub fn builder() -> crate::input::delete_input::Builder {
		crate::input::delete_input::Builder::default()
	}
	/// Creates a new `Delete` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for Delete {
	type Output = std::result::Result<crate::output::DeleteOutput, crate::error::DeleteError>;
	fn parse(&self, response: &http::Response<bytes::Bytes>) -> Self::Output {
		if !response.status().is_success() && response.status().as_u16() != 200 {
			crate::operation_deser::parse_delete_error(response)
		} else {
			crate::operation_deser::parse_delete_response(response)
		}
	}
}

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

/// Operation shape for `Get`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get`](crate::client::Client::get).
///
/// See [`crate::client::fluent_builders::Get`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct Get {
	_private: (),
}
impl Get {
	/// Creates a new builder-style object to manufacture [`GetInput`](crate::input::GetInput)
	pub fn builder() -> crate::input::get_input::Builder {
		crate::input::get_input::Builder::default()
	}
	/// Creates a new `Get` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for Get {
	type Output = std::result::Result<crate::output::GetOutput, crate::error::GetError>;
	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_error(response)
		} else {
			crate::operation_deser::parse_get_response(response)
		}
	}
}

/// Operation shape for `GetBatch`.
///
/// This is usually constructed for you using the the fluent builder returned by
/// [`get_batch`](crate::client::Client::get_batch).
///
/// See [`crate::client::fluent_builders::GetBatch`] for more details about the operation.
#[derive(std::default::Default, std::clone::Clone, std::fmt::Debug)]
pub struct GetBatch {
	_private: (),
}
impl GetBatch {
	/// Creates a new builder-style object to manufacture [`GetBatchInput`](crate::input::GetBatchInput)
	pub fn builder() -> crate::input::get_batch_input::Builder {
		crate::input::get_batch_input::Builder::default()
	}
	/// Creates a new `GetBatch` operation.
	pub fn new() -> Self {
		Self { _private: () }
	}
}
impl aws_smithy_http::response::ParseStrictResponse for GetBatch {
	type Output = std::result::Result<crate::output::GetBatchOutput, crate::error::GetBatchError>;
	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_batch_error(response)
		} else {
			crate::operation_deser::parse_get_batch_response(response)
		}
	}
}

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

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