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