aws_sdk_quicksight/operation/describe_topic/
_describe_topic_output.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 DescribeTopicOutput {
6    /// <p>The Amazon Resource Name (ARN) of the topic.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the topic that you want to describe. 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 a topic.</p>
11    pub topic: ::std::option::Option<crate::types::TopicDetails>,
12    /// <p>The Amazon Web Services request ID for this operation.</p>
13    pub request_id: ::std::option::Option<::std::string::String>,
14    /// <p>The HTTP status of the request.</p>
15    pub status: i32,
16    /// <p>Custom instructions for the topic.</p>
17    pub custom_instructions: ::std::option::Option<crate::types::CustomInstructions>,
18    _request_id: Option<String>,
19}
20impl DescribeTopicOutput {
21    /// <p>The Amazon Resource Name (ARN) of the topic.</p>
22    pub fn arn(&self) -> ::std::option::Option<&str> {
23        self.arn.as_deref()
24    }
25    /// <p>The ID of the topic that you want to describe. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
26    pub fn topic_id(&self) -> ::std::option::Option<&str> {
27        self.topic_id.as_deref()
28    }
29    /// <p>The definition of a topic.</p>
30    pub fn topic(&self) -> ::std::option::Option<&crate::types::TopicDetails> {
31        self.topic.as_ref()
32    }
33    /// <p>The Amazon Web Services request ID for this operation.</p>
34    pub fn request_id(&self) -> ::std::option::Option<&str> {
35        self.request_id.as_deref()
36    }
37    /// <p>The HTTP status of the request.</p>
38    pub fn status(&self) -> i32 {
39        self.status
40    }
41    /// <p>Custom instructions for the topic.</p>
42    pub fn custom_instructions(&self) -> ::std::option::Option<&crate::types::CustomInstructions> {
43        self.custom_instructions.as_ref()
44    }
45}
46impl ::aws_types::request_id::RequestId for DescribeTopicOutput {
47    fn request_id(&self) -> Option<&str> {
48        self._request_id.as_deref()
49    }
50}
51impl DescribeTopicOutput {
52    /// Creates a new builder-style object to manufacture [`DescribeTopicOutput`](crate::operation::describe_topic::DescribeTopicOutput).
53    pub fn builder() -> crate::operation::describe_topic::builders::DescribeTopicOutputBuilder {
54        crate::operation::describe_topic::builders::DescribeTopicOutputBuilder::default()
55    }
56}
57
58/// A builder for [`DescribeTopicOutput`](crate::operation::describe_topic::DescribeTopicOutput).
59#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
60#[non_exhaustive]
61pub struct DescribeTopicOutputBuilder {
62    pub(crate) arn: ::std::option::Option<::std::string::String>,
63    pub(crate) topic_id: ::std::option::Option<::std::string::String>,
64    pub(crate) topic: ::std::option::Option<crate::types::TopicDetails>,
65    pub(crate) request_id: ::std::option::Option<::std::string::String>,
66    pub(crate) status: ::std::option::Option<i32>,
67    pub(crate) custom_instructions: ::std::option::Option<crate::types::CustomInstructions>,
68    _request_id: Option<String>,
69}
70impl DescribeTopicOutputBuilder {
71    /// <p>The Amazon Resource Name (ARN) of the topic.</p>
72    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.arn = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>The Amazon Resource Name (ARN) of the topic.</p>
77    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.arn = input;
79        self
80    }
81    /// <p>The Amazon Resource Name (ARN) of the topic.</p>
82    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
83        &self.arn
84    }
85    /// <p>The ID of the topic that you want to describe. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
86    pub fn topic_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
87        self.topic_id = ::std::option::Option::Some(input.into());
88        self
89    }
90    /// <p>The ID of the topic that you want to describe. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
91    pub fn set_topic_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.topic_id = input;
93        self
94    }
95    /// <p>The ID of the topic that you want to describe. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
96    pub fn get_topic_id(&self) -> &::std::option::Option<::std::string::String> {
97        &self.topic_id
98    }
99    /// <p>The definition of a topic.</p>
100    pub fn topic(mut self, input: crate::types::TopicDetails) -> Self {
101        self.topic = ::std::option::Option::Some(input);
102        self
103    }
104    /// <p>The definition of a topic.</p>
105    pub fn set_topic(mut self, input: ::std::option::Option<crate::types::TopicDetails>) -> Self {
106        self.topic = input;
107        self
108    }
109    /// <p>The definition of a topic.</p>
110    pub fn get_topic(&self) -> &::std::option::Option<crate::types::TopicDetails> {
111        &self.topic
112    }
113    /// <p>The Amazon Web Services request ID for this operation.</p>
114    pub fn request_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.request_id = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The Amazon Web Services request ID for this operation.</p>
119    pub fn set_request_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.request_id = input;
121        self
122    }
123    /// <p>The Amazon Web Services request ID for this operation.</p>
124    pub fn get_request_id(&self) -> &::std::option::Option<::std::string::String> {
125        &self.request_id
126    }
127    /// <p>The HTTP status of the request.</p>
128    pub fn status(mut self, input: i32) -> Self {
129        self.status = ::std::option::Option::Some(input);
130        self
131    }
132    /// <p>The HTTP status of the request.</p>
133    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
134        self.status = input;
135        self
136    }
137    /// <p>The HTTP status of the request.</p>
138    pub fn get_status(&self) -> &::std::option::Option<i32> {
139        &self.status
140    }
141    /// <p>Custom instructions for the topic.</p>
142    pub fn custom_instructions(mut self, input: crate::types::CustomInstructions) -> Self {
143        self.custom_instructions = ::std::option::Option::Some(input);
144        self
145    }
146    /// <p>Custom instructions for the topic.</p>
147    pub fn set_custom_instructions(mut self, input: ::std::option::Option<crate::types::CustomInstructions>) -> Self {
148        self.custom_instructions = input;
149        self
150    }
151    /// <p>Custom instructions for the topic.</p>
152    pub fn get_custom_instructions(&self) -> &::std::option::Option<crate::types::CustomInstructions> {
153        &self.custom_instructions
154    }
155    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
156        self._request_id = Some(request_id.into());
157        self
158    }
159
160    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
161        self._request_id = request_id;
162        self
163    }
164    /// Consumes the builder and constructs a [`DescribeTopicOutput`](crate::operation::describe_topic::DescribeTopicOutput).
165    pub fn build(self) -> crate::operation::describe_topic::DescribeTopicOutput {
166        crate::operation::describe_topic::DescribeTopicOutput {
167            arn: self.arn,
168            topic_id: self.topic_id,
169            topic: self.topic,
170            request_id: self.request_id,
171            status: self.status.unwrap_or_default(),
172            custom_instructions: self.custom_instructions,
173            _request_id: self._request_id,
174        }
175    }
176}