#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutEntry {
pub key: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub value: std::option::Option<aws_smithy_types::Document>,
}
impl PutEntry {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
#[allow(missing_docs)] pub fn value(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.value.as_ref()
}
}
impl std::fmt::Debug for PutEntry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutEntry");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
pub mod put_entry {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
self.key = Some(input.into());
self
}
pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
self.key = input;
self
}
#[allow(missing_docs)] pub fn value(mut self, input: aws_smithy_types::Document) -> Self {
self.value = Some(input);
self
}
#[allow(missing_docs)] pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Document>) -> Self {
self.value = input;
self
}
pub fn build(self) -> crate::model::PutEntry {
crate::model::PutEntry {
key: self.key,
value: self.value,
}
}
}
}
impl PutEntry {
pub fn builder() -> crate::model::put_entry::Builder {
crate::model::put_entry::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct WatchResponse {
pub index: std::option::Option<std::string::String>,
}
impl WatchResponse {
pub fn index(&self) -> std::option::Option<&str> {
self.index.as_deref()
}
}
impl std::fmt::Debug for WatchResponse {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("WatchResponse");
formatter.field("index", &self.index);
formatter.finish()
}
}
pub mod watch_response {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) index: std::option::Option<std::string::String>,
}
impl Builder {
pub fn index(mut self, input: impl Into<std::string::String>) -> Self {
self.index = Some(input.into());
self
}
pub fn set_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.index = input;
self
}
pub fn build(self) -> crate::model::WatchResponse {
crate::model::WatchResponse { index: self.index }
}
}
}
impl WatchResponse {
pub fn builder() -> crate::model::watch_response::Builder {
crate::model::watch_response::Builder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct KvEntry {
pub key: std::option::Option<std::vec::Vec<std::string::String>>,
#[allow(missing_docs)] pub value: std::option::Option<aws_smithy_types::Document>,
#[allow(missing_docs)] pub deleted: std::option::Option<bool>,
}
impl KvEntry {
pub fn key(&self) -> std::option::Option<&[std::string::String]> {
self.key.as_deref()
}
#[allow(missing_docs)] pub fn value(&self) -> std::option::Option<&aws_smithy_types::Document> {
self.value.as_ref()
}
#[allow(missing_docs)] pub fn deleted(&self) -> std::option::Option<bool> {
self.deleted
}
}
impl std::fmt::Debug for KvEntry {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("KvEntry");
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.field("deleted", &self.deleted);
formatter.finish()
}
}
pub mod kv_entry {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) key: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) value: std::option::Option<aws_smithy_types::Document>,
pub(crate) deleted: std::option::Option<bool>,
}
impl Builder {
pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.key.unwrap_or_default();
v.push(input.into());
self.key = Some(v);
self
}
pub fn set_key(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.key = input;
self
}
#[allow(missing_docs)] pub fn value(mut self, input: aws_smithy_types::Document) -> Self {
self.value = Some(input);
self
}
#[allow(missing_docs)] pub fn set_value(mut self, input: std::option::Option<aws_smithy_types::Document>) -> Self {
self.value = input;
self
}
#[allow(missing_docs)] pub fn deleted(mut self, input: bool) -> Self {
self.deleted = Some(input);
self
}
#[allow(missing_docs)] pub fn set_deleted(mut self, input: std::option::Option<bool>) -> Self {
self.deleted = input;
self
}
pub fn build(self) -> crate::model::KvEntry {
crate::model::KvEntry {
key: self.key,
value: self.value,
deleted: self.deleted,
}
}
}
}
impl KvEntry {
pub fn builder() -> crate::model::kv_entry::Builder {
crate::model::kv_entry::Builder::default()
}
}