aws_sdk_quicksight/operation/update_topic/
_update_topic_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 UpdateTopicInput {
6    /// <p>The ID of the Amazon Web Services account that contains the topic that you want to update.</p>
7    pub aws_account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
9    pub topic_id: ::std::option::Option<::std::string::String>,
10    /// <p>The definition of the topic that you want to update.</p>
11    pub topic: ::std::option::Option<crate::types::TopicDetails>,
12}
13impl UpdateTopicInput {
14    /// <p>The ID of the Amazon Web Services account that contains the topic that you want to update.</p>
15    pub fn aws_account_id(&self) -> ::std::option::Option<&str> {
16        self.aws_account_id.as_deref()
17    }
18    /// <p>The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
19    pub fn topic_id(&self) -> ::std::option::Option<&str> {
20        self.topic_id.as_deref()
21    }
22    /// <p>The definition of the topic that you want to update.</p>
23    pub fn topic(&self) -> ::std::option::Option<&crate::types::TopicDetails> {
24        self.topic.as_ref()
25    }
26}
27impl UpdateTopicInput {
28    /// Creates a new builder-style object to manufacture [`UpdateTopicInput`](crate::operation::update_topic::UpdateTopicInput).
29    pub fn builder() -> crate::operation::update_topic::builders::UpdateTopicInputBuilder {
30        crate::operation::update_topic::builders::UpdateTopicInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateTopicInput`](crate::operation::update_topic::UpdateTopicInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateTopicInputBuilder {
38    pub(crate) aws_account_id: ::std::option::Option<::std::string::String>,
39    pub(crate) topic_id: ::std::option::Option<::std::string::String>,
40    pub(crate) topic: ::std::option::Option<crate::types::TopicDetails>,
41}
42impl UpdateTopicInputBuilder {
43    /// <p>The ID of the Amazon Web Services account that contains the topic that you want to update.</p>
44    /// This field is required.
45    pub fn aws_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.aws_account_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the Amazon Web Services account that contains the topic that you want to update.</p>
50    pub fn set_aws_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.aws_account_id = input;
52        self
53    }
54    /// <p>The ID of the Amazon Web Services account that contains the topic that you want to update.</p>
55    pub fn get_aws_account_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.aws_account_id
57    }
58    /// <p>The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
59    /// This field is required.
60    pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.topic_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
65    pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.topic_id = input;
67        self
68    }
69    /// <p>The ID of the topic that you want to modify. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
70    pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.topic_id
72    }
73    /// <p>The definition of the topic that you want to update.</p>
74    /// This field is required.
75    pub fn topic(mut self, input: crate::types::TopicDetails) -> Self {
76        self.topic = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The definition of the topic that you want to update.</p>
80    pub fn set_topic(mut self, input: ::std::option::Option<crate::types::TopicDetails>) -> Self {
81        self.topic = input;
82        self
83    }
84    /// <p>The definition of the topic that you want to update.</p>
85    pub fn get_topic(&self) -> &::std::option::Option<crate::types::TopicDetails> {
86        &self.topic
87    }
88    /// Consumes the builder and constructs a [`UpdateTopicInput`](crate::operation::update_topic::UpdateTopicInput).
89    pub fn build(self) -> ::std::result::Result<crate::operation::update_topic::UpdateTopicInput, ::aws_smithy_types::error::operation::BuildError> {
90        ::std::result::Result::Ok(crate::operation::update_topic::UpdateTopicInput {
91            aws_account_id: self.aws_account_id,
92            topic_id: self.topic_id,
93            topic: self.topic,
94        })
95    }
96}