aws_db_esdk/operation/resolve_attributes/
_resolve_attributes_input.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6#[allow(missing_docs)]
7pub struct ResolveAttributesInput {
8    /// The Item to be examined.
9    pub item: ::std::option::Option<
10        ::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>,
11    >,
12    /// Use the config for this Table.
13    pub table_name: ::std::option::Option<::std::string::String>,
14    /// The beacon version to use. Defaults to 'writeVersion'.
15    pub version: ::std::option::Option<::std::primitive::i32>,
16}
17impl ResolveAttributesInput {
18    /// The Item to be examined.
19    pub fn item(
20        &self,
21    ) -> &::std::option::Option<
22        ::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>,
23    > {
24        &self.item
25    }
26    /// Use the config for this Table.
27    pub fn table_name(&self) -> &::std::option::Option<::std::string::String> {
28        &self.table_name
29    }
30    /// The beacon version to use. Defaults to 'writeVersion'.
31    pub fn version(&self) -> &::std::option::Option<::std::primitive::i32> {
32        &self.version
33    }
34}
35impl ResolveAttributesInput {
36    /// Creates a new builder-style object to manufacture [`ResolveAttributesInput`](crate::operation::resolve_attributes::builders::ResolveAttributesInput).
37    pub fn builder() -> crate::operation::resolve_attributes::builders::ResolveAttributesInputBuilder
38    {
39        crate::operation::resolve_attributes::builders::ResolveAttributesInputBuilder::default()
40    }
41}
42
43/// A builder for [`ResolveAttributesInput`](crate::operation::operation::ResolveAttributesInput).
44#[non_exhaustive]
45#[derive(
46    ::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
47)]
48pub struct ResolveAttributesInputBuilder {
49    pub(crate) item: ::std::option::Option<
50        ::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>,
51    >,
52    pub(crate) table_name: ::std::option::Option<::std::string::String>,
53    pub(crate) version: ::std::option::Option<::std::primitive::i32>,
54}
55impl ResolveAttributesInputBuilder {
56    /// The Item to be examined.
57    pub fn item(
58        mut self,
59        input: impl ::std::convert::Into<
60            ::std::collections::HashMap<
61                ::std::string::String,
62                aws_sdk_dynamodb::types::AttributeValue,
63            >,
64        >,
65    ) -> Self {
66        self.item = ::std::option::Option::Some(input.into());
67        self
68    }
69    /// The Item to be examined.
70    pub fn set_item(
71        mut self,
72        input: ::std::option::Option<
73            ::std::collections::HashMap<
74                ::std::string::String,
75                aws_sdk_dynamodb::types::AttributeValue,
76            >,
77        >,
78    ) -> Self {
79        self.item = input;
80        self
81    }
82    /// The Item to be examined.
83    pub fn get_item(
84        &self,
85    ) -> &::std::option::Option<
86        ::std::collections::HashMap<::std::string::String, aws_sdk_dynamodb::types::AttributeValue>,
87    > {
88        &self.item
89    }
90    /// Use the config for this Table.
91    pub fn table_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
92        self.table_name = ::std::option::Option::Some(input.into());
93        self
94    }
95    /// Use the config for this Table.
96    pub fn set_table_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
97        self.table_name = input;
98        self
99    }
100    /// Use the config for this Table.
101    pub fn get_table_name(&self) -> &::std::option::Option<::std::string::String> {
102        &self.table_name
103    }
104    /// The beacon version to use. Defaults to 'writeVersion'.
105    pub fn version(mut self, input: impl ::std::convert::Into<::std::primitive::i32>) -> Self {
106        self.version = ::std::option::Option::Some(input.into());
107        self
108    }
109    /// The beacon version to use. Defaults to 'writeVersion'.
110    pub fn set_version(mut self, input: ::std::option::Option<::std::primitive::i32>) -> Self {
111        self.version = input;
112        self
113    }
114    /// The beacon version to use. Defaults to 'writeVersion'.
115    pub fn get_version(&self) -> &::std::option::Option<::std::primitive::i32> {
116        &self.version
117    }
118    /// Consumes the builder and constructs a [`ResolveAttributesInput`](crate::operation::operation::ResolveAttributesInput).
119    pub fn build(
120        self,
121    ) -> ::std::result::Result<
122        crate::operation::resolve_attributes::ResolveAttributesInput,
123        ::aws_smithy_types::error::operation::BuildError,
124    > {
125        ::std::result::Result::Ok(
126            crate::operation::resolve_attributes::ResolveAttributesInput {
127                item: self.item,
128                table_name: self.table_name,
129                version: self.version,
130            },
131        )
132    }
133}