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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutBatchOutput {}
impl std::fmt::Debug for PutBatchOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("PutBatchOutput");
		formatter.finish()
	}
}
/// See [`PutBatchOutput`](crate::output::PutBatchOutput)
pub mod put_batch_output {
	/// A builder for [`PutBatchOutput`](crate::output::PutBatchOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {}
	impl Builder {
		/// Consumes the builder and constructs a [`PutBatchOutput`](crate::output::PutBatchOutput)
		pub fn build(self) -> crate::output::PutBatchOutput {
			crate::output::PutBatchOutput {}
		}
	}
}
impl PutBatchOutput {
	/// Creates a new builder-style object to manufacture [`PutBatchOutput`](crate::output::PutBatchOutput)
	pub fn builder() -> crate::output::put_batch_output::Builder {
		crate::output::put_batch_output::Builder::default()
	}
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBatchOutput {}
impl std::fmt::Debug for DeleteBatchOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("DeleteBatchOutput");
		formatter.finish()
	}
}
/// See [`DeleteBatchOutput`](crate::output::DeleteBatchOutput)
pub mod delete_batch_output {
	/// A builder for [`DeleteBatchOutput`](crate::output::DeleteBatchOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {}
	impl Builder {
		/// Consumes the builder and constructs a [`DeleteBatchOutput`](crate::output::DeleteBatchOutput)
		pub fn build(self) -> crate::output::DeleteBatchOutput {
			crate::output::DeleteBatchOutput {}
		}
	}
}
impl DeleteBatchOutput {
	/// Creates a new builder-style object to manufacture [`DeleteBatchOutput`](crate::output::DeleteBatchOutput)
	pub fn builder() -> crate::output::delete_batch_output::Builder {
		crate::output::delete_batch_output::Builder::default()
	}
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBatchOutput {
	/// A list of key-value entries.
	pub entries: std::option::Option<std::vec::Vec<crate::model::KvEntry>>,
	/// Provided by watchable endpoints used in blocking loops.
	pub watch: std::option::Option<crate::model::WatchResponse>,
}
impl GetBatchOutput {
	/// A list of key-value entries.
	pub fn entries(&self) -> std::option::Option<&[crate::model::KvEntry]> {
		self.entries.as_deref()
	}
	/// Provided by watchable endpoints used in blocking loops.
	pub fn watch(&self) -> std::option::Option<&crate::model::WatchResponse> {
		self.watch.as_ref()
	}
}
impl std::fmt::Debug for GetBatchOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("GetBatchOutput");
		formatter.field("entries", &self.entries);
		formatter.field("watch", &self.watch);
		formatter.finish()
	}
}
/// See [`GetBatchOutput`](crate::output::GetBatchOutput)
pub mod get_batch_output {
	/// A builder for [`GetBatchOutput`](crate::output::GetBatchOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {
		pub(crate) entries: std::option::Option<std::vec::Vec<crate::model::KvEntry>>,
		pub(crate) watch: std::option::Option<crate::model::WatchResponse>,
	}
	impl Builder {
		/// Appends an item to `entries`.
		///
		/// To override the contents of this collection use [`set_entries`](Self::set_entries).
		///
		/// A list of key-value entries.
		pub fn entries(mut self, input: crate::model::KvEntry) -> Self {
			let mut v = self.entries.unwrap_or_default();
			v.push(input);
			self.entries = Some(v);
			self
		}
		/// A list of key-value entries.
		pub fn set_entries(
			mut self,
			input: std::option::Option<std::vec::Vec<crate::model::KvEntry>>,
		) -> Self {
			self.entries = input;
			self
		}
		/// Provided by watchable endpoints used in blocking loops.
		pub fn watch(mut self, input: crate::model::WatchResponse) -> Self {
			self.watch = Some(input);
			self
		}
		/// Provided by watchable endpoints used in blocking loops.
		pub fn set_watch(
			mut self,
			input: std::option::Option<crate::model::WatchResponse>,
		) -> Self {
			self.watch = input;
			self
		}
		/// Consumes the builder and constructs a [`GetBatchOutput`](crate::output::GetBatchOutput)
		pub fn build(self) -> crate::output::GetBatchOutput {
			crate::output::GetBatchOutput {
				entries: self.entries,
				watch: self.watch,
			}
		}
	}
}
impl GetBatchOutput {
	/// Creates a new builder-style object to manufacture [`GetBatchOutput`](crate::output::GetBatchOutput)
	pub fn builder() -> crate::output::get_batch_output::Builder {
		crate::output::get_batch_output::Builder::default()
	}
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutOutput {}
impl std::fmt::Debug for PutOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("PutOutput");
		formatter.finish()
	}
}
/// See [`PutOutput`](crate::output::PutOutput)
pub mod put_output {
	/// A builder for [`PutOutput`](crate::output::PutOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {}
	impl Builder {
		/// Consumes the builder and constructs a [`PutOutput`](crate::output::PutOutput)
		pub fn build(self) -> crate::output::PutOutput {
			crate::output::PutOutput {}
		}
	}
}
impl PutOutput {
	/// Creates a new builder-style object to manufacture [`PutOutput`](crate::output::PutOutput)
	pub fn builder() -> crate::output::put_output::Builder {
		crate::output::put_output::Builder::default()
	}
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteOutput {}
impl std::fmt::Debug for DeleteOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("DeleteOutput");
		formatter.finish()
	}
}
/// See [`DeleteOutput`](crate::output::DeleteOutput)
pub mod delete_output {
	/// A builder for [`DeleteOutput`](crate::output::DeleteOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {}
	impl Builder {
		/// Consumes the builder and constructs a [`DeleteOutput`](crate::output::DeleteOutput)
		pub fn build(self) -> crate::output::DeleteOutput {
			crate::output::DeleteOutput {}
		}
	}
}
impl DeleteOutput {
	/// Creates a new builder-style object to manufacture [`DeleteOutput`](crate::output::DeleteOutput)
	pub fn builder() -> crate::output::delete_output::Builder {
		crate::output::delete_output::Builder::default()
	}
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetOutput {
	/// The key's JSON value.
	pub value: std::option::Option<aws_smithy_types::Document>,
	/// Whether or not the entry has been deleted. Only set when watching this endpoint.
	pub deleted: std::option::Option<bool>,
	/// Provided by watchable endpoints used in blocking loops.
	pub watch: std::option::Option<crate::model::WatchResponse>,
}
impl GetOutput {
	/// The key's JSON value.
	pub fn value(&self) -> std::option::Option<&aws_smithy_types::Document> {
		self.value.as_ref()
	}
	/// Whether or not the entry has been deleted. Only set when watching this endpoint.
	pub fn deleted(&self) -> std::option::Option<bool> {
		self.deleted
	}
	/// Provided by watchable endpoints used in blocking loops.
	pub fn watch(&self) -> std::option::Option<&crate::model::WatchResponse> {
		self.watch.as_ref()
	}
}
impl std::fmt::Debug for GetOutput {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let mut formatter = f.debug_struct("GetOutput");
		formatter.field("value", &self.value);
		formatter.field("deleted", &self.deleted);
		formatter.field("watch", &self.watch);
		formatter.finish()
	}
}
/// See [`GetOutput`](crate::output::GetOutput)
pub mod get_output {
	/// A builder for [`GetOutput`](crate::output::GetOutput)
	#[non_exhaustive]
	#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
	pub struct Builder {
		pub(crate) value: std::option::Option<aws_smithy_types::Document>,
		pub(crate) deleted: std::option::Option<bool>,
		pub(crate) watch: std::option::Option<crate::model::WatchResponse>,
	}
	impl Builder {
		/// The key's JSON value.
		pub fn value(mut self, input: aws_smithy_types::Document) -> Self {
			self.value = Some(input);
			self
		}
		/// The key's JSON value.
		pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Document>) -> Self {
			self.value = input;
			self
		}
		/// Whether or not the entry has been deleted. Only set when watching this endpoint.
		pub fn deleted(mut self, input: bool) -> Self {
			self.deleted = Some(input);
			self
		}
		/// Whether or not the entry has been deleted. Only set when watching this endpoint.
		pub fn set_deleted(mut self, input: std::option::Option<bool>) -> Self {
			self.deleted = input;
			self
		}
		/// Provided by watchable endpoints used in blocking loops.
		pub fn watch(mut self, input: crate::model::WatchResponse) -> Self {
			self.watch = Some(input);
			self
		}
		/// Provided by watchable endpoints used in blocking loops.
		pub fn set_watch(
			mut self,
			input: std::option::Option<crate::model::WatchResponse>,
		) -> Self {
			self.watch = input;
			self
		}
		/// Consumes the builder and constructs a [`GetOutput`](crate::output::GetOutput)
		pub fn build(self) -> crate::output::GetOutput {
			crate::output::GetOutput {
				value: self.value,
				deleted: self.deleted,
				watch: self.watch,
			}
		}
	}
}
impl GetOutput {
	/// Creates a new builder-style object to manufacture [`GetOutput`](crate::output::GetOutput)
	pub fn builder() -> crate::output::get_output::Builder {
		crate::output::get_output::Builder::default()
	}
}