use std::fmt::Write;
pub mod delete_input {
#[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) namespace_id: std::option::Option<std::string::String>,
}
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
}
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::DeleteInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::DeleteInput {
key: self.key,
namespace_id: self.namespace_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteInputOperationOutputAlias = crate::operation::Delete;
#[doc(hidden)]
pub type DeleteInputOperationRetryAlias = ();
impl DeleteInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::Delete, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_1) = &_input.key {
query.push_kv("key", &aws_smithy_http::query::fmt_string(&inner_1));
}
if let Some(inner_2) = &_input.namespace_id {
query.push_kv(
"namespace_id",
&aws_smithy_http::query::fmt_string(&inner_2),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
uri_query(input, &mut _uri)?;
Ok(builder.method("DELETE").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::Delete::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"Delete",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::delete_input::Builder {
crate::input::delete_input::Builder::default()
}
}
pub mod delete_batch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) keys: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) namespace_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.keys.unwrap_or_default();
v.push(input.into());
self.keys = Some(v);
self
}
pub fn set_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.keys = input;
self
}
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<
crate::input::DeleteBatchInput,
aws_smithy_http::operation::BuildError,
> {
Ok(crate::input::DeleteBatchInput {
keys: self.keys,
namespace_id: self.namespace_id,
})
}
}
}
#[doc(hidden)]
pub type DeleteBatchInputOperationOutputAlias = crate::operation::DeleteBatch;
#[doc(hidden)]
pub type DeleteBatchInputOperationRetryAlias = ();
impl DeleteBatchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::DeleteBatch, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::DeleteBatchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries/batch").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::DeleteBatchInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_3) = &_input.keys {
for inner_4 in inner_3 {
query.push_kv("keys", &aws_smithy_http::query::fmt_string(&inner_4));
}
}
if let Some(inner_5) = &_input.namespace_id {
query.push_kv(
"namespace_id",
&aws_smithy_http::query::fmt_string(&inner_5),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::DeleteBatchInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
uri_query(input, &mut _uri)?;
Ok(builder.method("DELETE").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op = aws_smithy_http::operation::Operation::new(
request,
crate::operation::DeleteBatch::new(),
)
.with_metadata(aws_smithy_http::operation::Metadata::new(
"DeleteBatch",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::delete_batch_input::Builder {
crate::input::delete_batch_input::Builder::default()
}
}
pub mod get_input {
#[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) watch_index: std::option::Option<std::string::String>,
pub(crate) namespace_id: std::option::Option<std::string::String>,
}
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
}
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.watch_index = Some(input.into());
self
}
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.watch_index = input;
self
}
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetInput, aws_smithy_http::operation::BuildError> {
Ok(crate::input::GetInput {
key: self.key,
watch_index: self.watch_index,
namespace_id: self.namespace_id,
})
}
}
}
#[doc(hidden)]
pub type GetInputOperationOutputAlias = crate::operation::Get;
#[doc(hidden)]
pub type GetInputOperationRetryAlias = ();
impl GetInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::Get, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_6) = &_input.key {
query.push_kv("key", &aws_smithy_http::query::fmt_string(&inner_6));
}
if let Some(inner_7) = &_input.watch_index {
query.push_kv("watch_index", &aws_smithy_http::query::fmt_string(&inner_7));
}
if let Some(inner_8) = &_input.namespace_id {
query.push_kv(
"namespace_id",
&aws_smithy_http::query::fmt_string(&inner_8),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
uri_query(input, &mut _uri)?;
Ok(builder.method("GET").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op = aws_smithy_http::operation::Operation::new(request, crate::operation::Get::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"Get",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::get_input::Builder {
crate::input::get_input::Builder::default()
}
}
pub mod get_batch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) keys: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) watch_index: std::option::Option<std::string::String>,
pub(crate) namespace_id: std::option::Option<std::string::String>,
}
impl Builder {
pub fn keys(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.keys.unwrap_or_default();
v.push(input.into());
self.keys = Some(v);
self
}
pub fn set_keys(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.keys = input;
self
}
pub fn watch_index(mut self, input: impl Into<std::string::String>) -> Self {
self.watch_index = Some(input.into());
self
}
pub fn set_watch_index(mut self, input: std::option::Option<std::string::String>) -> Self {
self.watch_index = input;
self
}
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::GetBatchInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::GetBatchInput {
keys: self.keys,
watch_index: self.watch_index,
namespace_id: self.namespace_id,
})
}
}
}
#[doc(hidden)]
pub type GetBatchInputOperationOutputAlias = crate::operation::GetBatch;
#[doc(hidden)]
pub type GetBatchInputOperationRetryAlias = ();
impl GetBatchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::GetBatch, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::GetBatchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries/batch").expect("formatting should succeed");
Ok(())
}
fn uri_query(
_input: &crate::input::GetBatchInput,
mut output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
let mut query = aws_smithy_http::query::Writer::new(&mut output);
if let Some(inner_9) = &_input.keys {
for inner_10 in inner_9 {
query.push_kv("keys", &aws_smithy_http::query::fmt_string(&inner_10));
}
}
if let Some(inner_11) = &_input.watch_index {
query.push_kv(
"watch_index",
&aws_smithy_http::query::fmt_string(&inner_11),
);
}
if let Some(inner_12) = &_input.namespace_id {
query.push_kv(
"namespace_id",
&aws_smithy_http::query::fmt_string(&inner_12),
);
}
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::GetBatchInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
uri_query(input, &mut _uri)?;
Ok(builder.method("GET").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from("");
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::GetBatch::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"GetBatch",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::get_batch_input::Builder {
crate::input::get_batch_input::Builder::default()
}
}
pub mod put_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) namespace_id: std::option::Option<std::string::String>,
pub(crate) key: std::option::Option<std::string::String>,
pub(crate) value: std::option::Option<aws_smithy_types::Document>,
}
impl Builder {
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
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,
) -> std::result::Result<crate::input::PutInput, aws_smithy_http::operation::BuildError> {
Ok(crate::input::PutInput {
namespace_id: self.namespace_id,
key: self.key,
value: self.value,
})
}
}
}
#[doc(hidden)]
pub type PutInputOperationOutputAlias = crate::operation::Put;
#[doc(hidden)]
pub type PutInputOperationRetryAlias = ();
impl PutInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::Put, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::PutInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
Ok(builder.method("PUT").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op = aws_smithy_http::operation::Operation::new(request, crate::operation::Put::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"Put",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::put_input::Builder {
crate::input::put_input::Builder::default()
}
}
pub mod put_batch_input {
#[non_exhaustive]
#[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Builder {
pub(crate) namespace_id: std::option::Option<std::string::String>,
pub(crate) entries: std::option::Option<std::vec::Vec<crate::model::PutEntry>>,
}
impl Builder {
pub fn namespace_id(mut self, input: impl Into<std::string::String>) -> Self {
self.namespace_id = Some(input.into());
self
}
pub fn set_namespace_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.namespace_id = input;
self
}
pub fn entries(mut self, input: crate::model::PutEntry) -> Self {
let mut v = self.entries.unwrap_or_default();
v.push(input);
self.entries = Some(v);
self
}
pub fn set_entries(
mut self,
input: std::option::Option<std::vec::Vec<crate::model::PutEntry>>,
) -> Self {
self.entries = input;
self
}
pub fn build(
self,
) -> std::result::Result<crate::input::PutBatchInput, aws_smithy_http::operation::BuildError>
{
Ok(crate::input::PutBatchInput {
namespace_id: self.namespace_id,
entries: self.entries,
})
}
}
}
#[doc(hidden)]
pub type PutBatchInputOperationOutputAlias = crate::operation::PutBatch;
#[doc(hidden)]
pub type PutBatchInputOperationRetryAlias = ();
impl PutBatchInput {
#[allow(unused_mut)]
#[allow(clippy::let_and_return)]
#[allow(clippy::needless_borrow)]
pub async fn make_operation(
&self,
_config: &crate::config::Config,
) -> std::result::Result<
aws_smithy_http::operation::Operation<crate::operation::PutBatch, ()>,
aws_smithy_http::operation::BuildError,
> {
let mut request = {
fn uri_base(
_input: &crate::input::PutBatchInput,
output: &mut String,
) -> Result<(), aws_smithy_http::operation::BuildError> {
write!(output, "/entries/batch").expect("formatting should succeed");
Ok(())
}
#[allow(clippy::unnecessary_wraps)]
fn update_http_builder(
input: &crate::input::PutBatchInput,
_config: &crate::config::Config,
builder: http::request::Builder,
) -> std::result::Result<http::request::Builder, aws_smithy_http::operation::BuildError>
{
let mut _uri = String::new();
_uri = format!("{}{}", _config.uri.clone(), _uri);
uri_base(input, &mut _uri)?;
Ok(builder.method("PUT").uri(_uri))
}
let mut builder = update_http_builder(&self, _config, http::request::Builder::new())?;
let mut builder = if let Some(auth) = &_config.auth {
builder.header(http::header::AUTHORIZATION, auth.clone())
} else {
builder
};
builder = aws_smithy_http::header::set_request_header_if_absent(
builder,
http::header::CONTENT_TYPE,
"application/json",
);
builder
};
let mut properties = aws_smithy_http::property_bag::SharedPropertyBag::new();
#[allow(clippy::useless_conversion)]
let body = aws_smithy_http::body::SdkBody::from(
crate::operation_ser::serialize_operation_crate_operation_put_batch(&self)?,
);
if let Some(content_length) = body.content_length() {
request = aws_smithy_http::header::set_request_header_if_absent(
request,
http::header::CONTENT_LENGTH,
content_length,
);
}
let request = request.body(body).expect("should be valid request");
let mut request = aws_smithy_http::operation::Request::from_parts(request, properties);
request
.properties_mut()
.insert(aws_smithy_http::http_versions::DEFAULT_HTTP_VERSION_LIST.clone());
let op =
aws_smithy_http::operation::Operation::new(request, crate::operation::PutBatch::new())
.with_metadata(aws_smithy_http::operation::Metadata::new(
"PutBatch",
"KvService",
));
Ok(op)
}
pub fn builder() -> crate::input::put_batch_input::Builder {
crate::input::put_batch_input::Builder::default()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutBatchInput {
pub namespace_id: std::option::Option<std::string::String>,
pub entries: std::option::Option<std::vec::Vec<crate::model::PutEntry>>,
}
impl PutBatchInput {
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
pub fn entries(&self) -> std::option::Option<&[crate::model::PutEntry]> {
self.entries.as_deref()
}
}
impl std::fmt::Debug for PutBatchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutBatchInput");
formatter.field("namespace_id", &self.namespace_id);
formatter.field("entries", &self.entries);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteBatchInput {
pub keys: std::option::Option<std::vec::Vec<std::string::String>>,
pub namespace_id: std::option::Option<std::string::String>,
}
impl DeleteBatchInput {
pub fn keys(&self) -> std::option::Option<&[std::string::String]> {
self.keys.as_deref()
}
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
}
impl std::fmt::Debug for DeleteBatchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteBatchInput");
formatter.field("keys", &self.keys);
formatter.field("namespace_id", &self.namespace_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetBatchInput {
pub keys: std::option::Option<std::vec::Vec<std::string::String>>,
pub watch_index: std::option::Option<std::string::String>,
pub namespace_id: std::option::Option<std::string::String>,
}
impl GetBatchInput {
pub fn keys(&self) -> std::option::Option<&[std::string::String]> {
self.keys.as_deref()
}
pub fn watch_index(&self) -> std::option::Option<&str> {
self.watch_index.as_deref()
}
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
}
impl std::fmt::Debug for GetBatchInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetBatchInput");
formatter.field("keys", &self.keys);
formatter.field("watch_index", &self.watch_index);
formatter.field("namespace_id", &self.namespace_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PutInput {
pub namespace_id: std::option::Option<std::string::String>,
pub key: std::option::Option<std::string::String>,
#[allow(missing_docs)] pub value: std::option::Option<aws_smithy_types::Document>,
}
impl PutInput {
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
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 PutInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("PutInput");
formatter.field("namespace_id", &self.namespace_id);
formatter.field("key", &self.key);
formatter.field("value", &self.value);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeleteInput {
pub key: std::option::Option<std::string::String>,
pub namespace_id: std::option::Option<std::string::String>,
}
impl DeleteInput {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
}
impl std::fmt::Debug for DeleteInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("DeleteInput");
formatter.field("key", &self.key);
formatter.field("namespace_id", &self.namespace_id);
formatter.finish()
}
}
#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct GetInput {
pub key: std::option::Option<std::string::String>,
pub watch_index: std::option::Option<std::string::String>,
pub namespace_id: std::option::Option<std::string::String>,
}
impl GetInput {
pub fn key(&self) -> std::option::Option<&str> {
self.key.as_deref()
}
pub fn watch_index(&self) -> std::option::Option<&str> {
self.watch_index.as_deref()
}
pub fn namespace_id(&self) -> std::option::Option<&str> {
self.namespace_id.as_deref()
}
}
impl std::fmt::Debug for GetInput {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut formatter = f.debug_struct("GetInput");
formatter.field("key", &self.key);
formatter.field("watch_index", &self.watch_index);
formatter.field("namespace_id", &self.namespace_id);
formatter.finish()
}
}