aws_sdk_docdb/operation/list_tags_for_resource/
_list_tags_for_resource_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents the input to <code>ListTagsForResource</code>.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ListTagsForResourceInput {
7    /// <p>The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
8    pub resource_name: ::std::option::Option<::std::string::String>,
9    /// <p>This parameter is not currently supported.</p>
10    pub filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
11}
12impl ListTagsForResourceInput {
13    /// <p>The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
14    pub fn resource_name(&self) -> ::std::option::Option<&str> {
15        self.resource_name.as_deref()
16    }
17    /// <p>This parameter is not currently supported.</p>
18    ///
19    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.filters.is_none()`.
20    pub fn filters(&self) -> &[crate::types::Filter] {
21        self.filters.as_deref().unwrap_or_default()
22    }
23}
24impl ListTagsForResourceInput {
25    /// Creates a new builder-style object to manufacture [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
26    pub fn builder() -> crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder {
27        crate::operation::list_tags_for_resource::builders::ListTagsForResourceInputBuilder::default()
28    }
29}
30
31/// A builder for [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
32#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct ListTagsForResourceInputBuilder {
35    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
36    pub(crate) filters: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>,
37}
38impl ListTagsForResourceInputBuilder {
39    /// <p>The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
40    /// This field is required.
41    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
42        self.resource_name = ::std::option::Option::Some(input.into());
43        self
44    }
45    /// <p>The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
46    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.resource_name = input;
48        self
49    }
50    /// <p>The Amazon DocumentDB resource with tags to be listed. This value is an Amazon Resource Name (ARN).</p>
51    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
52        &self.resource_name
53    }
54    /// Appends an item to `filters`.
55    ///
56    /// To override the contents of this collection use [`set_filters`](Self::set_filters).
57    ///
58    /// <p>This parameter is not currently supported.</p>
59    pub fn filters(mut self, input: crate::types::Filter) -> Self {
60        let mut v = self.filters.unwrap_or_default();
61        v.push(input);
62        self.filters = ::std::option::Option::Some(v);
63        self
64    }
65    /// <p>This parameter is not currently supported.</p>
66    pub fn set_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Filter>>) -> Self {
67        self.filters = input;
68        self
69    }
70    /// <p>This parameter is not currently supported.</p>
71    pub fn get_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Filter>> {
72        &self.filters
73    }
74    /// Consumes the builder and constructs a [`ListTagsForResourceInput`](crate::operation::list_tags_for_resource::ListTagsForResourceInput).
75    pub fn build(
76        self,
77    ) -> ::std::result::Result<crate::operation::list_tags_for_resource::ListTagsForResourceInput, ::aws_smithy_types::error::operation::BuildError>
78    {
79        ::std::result::Result::Ok(crate::operation::list_tags_for_resource::ListTagsForResourceInput {
80            resource_name: self.resource_name,
81            filters: self.filters,
82        })
83    }
84}