aws_sdk_dax/operation/list_tags/
_list_tags_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 ListTagsInput {
6    /// <p>The name of the DAX resource to which the tags belong.</p>
7    pub resource_name: ::std::option::Option<::std::string::String>,
8    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token.</p>
9    pub next_token: ::std::option::Option<::std::string::String>,
10}
11impl ListTagsInput {
12    /// <p>The name of the DAX resource to which the tags belong.</p>
13    pub fn resource_name(&self) -> ::std::option::Option<&str> {
14        self.resource_name.as_deref()
15    }
16    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token.</p>
17    pub fn next_token(&self) -> ::std::option::Option<&str> {
18        self.next_token.as_deref()
19    }
20}
21impl ListTagsInput {
22    /// Creates a new builder-style object to manufacture [`ListTagsInput`](crate::operation::list_tags::ListTagsInput).
23    pub fn builder() -> crate::operation::list_tags::builders::ListTagsInputBuilder {
24        crate::operation::list_tags::builders::ListTagsInputBuilder::default()
25    }
26}
27
28/// A builder for [`ListTagsInput`](crate::operation::list_tags::ListTagsInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct ListTagsInputBuilder {
32    pub(crate) resource_name: ::std::option::Option<::std::string::String>,
33    pub(crate) next_token: ::std::option::Option<::std::string::String>,
34}
35impl ListTagsInputBuilder {
36    /// <p>The name of the DAX resource to which the tags belong.</p>
37    /// This field is required.
38    pub fn resource_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.resource_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The name of the DAX resource to which the tags belong.</p>
43    pub fn set_resource_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.resource_name = input;
45        self
46    }
47    /// <p>The name of the DAX resource to which the tags belong.</p>
48    pub fn get_resource_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.resource_name
50    }
51    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token.</p>
52    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
53        self.next_token = ::std::option::Option::Some(input.into());
54        self
55    }
56    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token.</p>
57    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.next_token = input;
59        self
60    }
61    /// <p>An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token.</p>
62    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
63        &self.next_token
64    }
65    /// Consumes the builder and constructs a [`ListTagsInput`](crate::operation::list_tags::ListTagsInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::list_tags::ListTagsInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::list_tags::ListTagsInput {
68            resource_name: self.resource_name,
69            next_token: self.next_token,
70        })
71    }
72}