aws_sdk_dynamodb/types/
_item_response.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ItemResponse {
7 pub item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
9}
10impl ItemResponse {
11 pub fn item(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
13 self.item.as_ref()
14 }
15}
16impl ItemResponse {
17 pub fn builder() -> crate::types::builders::ItemResponseBuilder {
19 crate::types::builders::ItemResponseBuilder::default()
20 }
21}
22
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct ItemResponseBuilder {
27 pub(crate) item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
28}
29impl ItemResponseBuilder {
30 pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
36 let mut hash_map = self.item.unwrap_or_default();
37 hash_map.insert(k.into(), v);
38 self.item = ::std::option::Option::Some(hash_map);
39 self
40 }
41 pub fn set_item(
43 mut self,
44 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
45 ) -> Self {
46 self.item = input;
47 self
48 }
49 pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
51 &self.item
52 }
53 pub fn build(self) -> crate::types::ItemResponse {
55 crate::types::ItemResponse { item: self.item }
56 }
57}