aws_sdk_dynamodb/operation/describe_table/
_describe_table_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the output of a <code>DescribeTable</code> operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DescribeTableOutput {
7    /// <p>The properties of the table.</p>
8    pub table: ::std::option::Option<crate::types::TableDescription>,
9    _request_id: Option<String>,
10}
11impl DescribeTableOutput {
12    /// <p>The properties of the table.</p>
13    pub fn table(&self) -> ::std::option::Option<&crate::types::TableDescription> {
14        self.table.as_ref()
15    }
16}
17impl ::aws_types::request_id::RequestId for DescribeTableOutput {
18    fn request_id(&self) -> Option<&str> {
19        self._request_id.as_deref()
20    }
21}
22impl DescribeTableOutput {
23    /// Creates a new builder-style object to manufacture [`DescribeTableOutput`](crate::operation::describe_table::DescribeTableOutput).
24    pub fn builder() -> crate::operation::describe_table::builders::DescribeTableOutputBuilder {
25        crate::operation::describe_table::builders::DescribeTableOutputBuilder::default()
26    }
27}
28
29/// A builder for [`DescribeTableOutput`](crate::operation::describe_table::DescribeTableOutput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct DescribeTableOutputBuilder {
33    pub(crate) table: ::std::option::Option<crate::types::TableDescription>,
34    _request_id: Option<String>,
35}
36impl DescribeTableOutputBuilder {
37    /// <p>The properties of the table.</p>
38    pub fn table(mut self, input: crate::types::TableDescription) -> Self {
39        self.table = ::std::option::Option::Some(input);
40        self
41    }
42    /// <p>The properties of the table.</p>
43    pub fn set_table(mut self, input: ::std::option::Option<crate::types::TableDescription>) -> Self {
44        self.table = input;
45        self
46    }
47    /// <p>The properties of the table.</p>
48    pub fn get_table(&self) -> &::std::option::Option<crate::types::TableDescription> {
49        &self.table
50    }
51    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
52        self._request_id = Some(request_id.into());
53        self
54    }
55
56    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
57        self._request_id = request_id;
58        self
59    }
60    /// Consumes the builder and constructs a [`DescribeTableOutput`](crate::operation::describe_table::DescribeTableOutput).
61    pub fn build(self) -> crate::operation::describe_table::DescribeTableOutput {
62        crate::operation::describe_table::DescribeTableOutput {
63            table: self.table,
64            _request_id: self._request_id,
65        }
66    }
67}