aws_sdk_iotthingsgraph/operation/describe_namespace/
_describe_namespace_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeNamespaceInput {
6    /// <p>The name of the user's namespace. Set this to <code>aws</code> to get the public namespace.</p>
7    pub namespace_name: ::std::option::Option<::std::string::String>,
8}
9impl DescribeNamespaceInput {
10    /// <p>The name of the user's namespace. Set this to <code>aws</code> to get the public namespace.</p>
11    pub fn namespace_name(&self) -> ::std::option::Option<&str> {
12        self.namespace_name.as_deref()
13    }
14}
15impl DescribeNamespaceInput {
16    /// Creates a new builder-style object to manufacture [`DescribeNamespaceInput`](crate::operation::describe_namespace::DescribeNamespaceInput).
17    pub fn builder() -> crate::operation::describe_namespace::builders::DescribeNamespaceInputBuilder {
18        crate::operation::describe_namespace::builders::DescribeNamespaceInputBuilder::default()
19    }
20}
21
22/// A builder for [`DescribeNamespaceInput`](crate::operation::describe_namespace::DescribeNamespaceInput).
23#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
24#[non_exhaustive]
25pub struct DescribeNamespaceInputBuilder {
26    pub(crate) namespace_name: ::std::option::Option<::std::string::String>,
27}
28impl DescribeNamespaceInputBuilder {
29    /// <p>The name of the user's namespace. Set this to <code>aws</code> to get the public namespace.</p>
30    pub fn namespace_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
31        self.namespace_name = ::std::option::Option::Some(input.into());
32        self
33    }
34    /// <p>The name of the user's namespace. Set this to <code>aws</code> to get the public namespace.</p>
35    pub fn set_namespace_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
36        self.namespace_name = input;
37        self
38    }
39    /// <p>The name of the user's namespace. Set this to <code>aws</code> to get the public namespace.</p>
40    pub fn get_namespace_name(&self) -> &::std::option::Option<::std::string::String> {
41        &self.namespace_name
42    }
43    /// Consumes the builder and constructs a [`DescribeNamespaceInput`](crate::operation::describe_namespace::DescribeNamespaceInput).
44    pub fn build(
45        self,
46    ) -> ::std::result::Result<crate::operation::describe_namespace::DescribeNamespaceInput, ::aws_smithy_types::error::operation::BuildError> {
47        ::std::result::Result::Ok(crate::operation::describe_namespace::DescribeNamespaceInput {
48            namespace_name: self.namespace_name,
49        })
50    }
51}