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