1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Details for the requested item.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ItemResponse {
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
    pub item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
}
impl ItemResponse {
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
    pub fn item(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
        self.item.as_ref()
    }
}
impl ItemResponse {
    /// Creates a new builder-style object to manufacture [`ItemResponse`](crate::types::ItemResponse).
    pub fn builder() -> crate::types::builders::ItemResponseBuilder {
        crate::types::builders::ItemResponseBuilder::default()
    }
}

/// A builder for [`ItemResponse`](crate::types::ItemResponse).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ItemResponseBuilder {
    pub(crate) item: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
}
impl ItemResponseBuilder {
    /// Adds a key-value pair to `item`.
    ///
    /// To override the contents of this collection use [`set_item`](Self::set_item).
    ///
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
    pub fn item(mut self, k: impl ::std::convert::Into<::std::string::String>, v: crate::types::AttributeValue) -> Self {
        let mut hash_map = self.item.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.item = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
    pub fn set_item(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>>,
    ) -> Self {
        self.item = input;
        self
    }
    /// <p>Map of attribute data consisting of the data type and attribute value.</p>
    pub fn get_item(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::AttributeValue>> {
        &self.item
    }
    /// Consumes the builder and constructs a [`ItemResponse`](crate::types::ItemResponse).
    pub fn build(self) -> crate::types::ItemResponse {
        crate::types::ItemResponse { item: self.item }
    }
}