aws_sdk_ivschat/operation/create_room/
_create_room_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 CreateRoomOutput {
6    /// <p>Room ARN, assigned by the system.</p>
7    pub arn: ::std::option::Option<::std::string::String>,
8    /// <p>Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.</p>
9    pub id: ::std::option::Option<::std::string::String>,
10    /// <p>Room name, from the request (if specified).</p>
11    pub name: ::std::option::Option<::std::string::String>,
12    /// <p>Time when the room was created. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
13    pub create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
14    /// <p>Time of the room’s last update. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
15    pub update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
16    /// <p>Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).</p>
17    pub maximum_message_rate_per_second: ::std::option::Option<i32>,
18    /// <p>Maximum number of characters in a single message, from the request (if specified).</p>
19    pub maximum_message_length: ::std::option::Option<i32>,
20    /// <p>Configuration information for optional review of messages.</p>
21    pub message_review_handler: ::std::option::Option<crate::types::MessageReviewHandler>,
22    /// <p>Tags attached to the resource, from the request (if specified).</p>
23    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
24    /// <p>Array of logging configurations attached to the room, from the request (if specified).</p>
25    pub logging_configuration_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
26    _request_id: Option<String>,
27}
28impl CreateRoomOutput {
29    /// <p>Room ARN, assigned by the system.</p>
30    pub fn arn(&self) -> ::std::option::Option<&str> {
31        self.arn.as_deref()
32    }
33    /// <p>Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.</p>
34    pub fn id(&self) -> ::std::option::Option<&str> {
35        self.id.as_deref()
36    }
37    /// <p>Room name, from the request (if specified).</p>
38    pub fn name(&self) -> ::std::option::Option<&str> {
39        self.name.as_deref()
40    }
41    /// <p>Time when the room was created. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
42    pub fn create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
43        self.create_time.as_ref()
44    }
45    /// <p>Time of the room’s last update. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
46    pub fn update_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
47        self.update_time.as_ref()
48    }
49    /// <p>Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).</p>
50    pub fn maximum_message_rate_per_second(&self) -> ::std::option::Option<i32> {
51        self.maximum_message_rate_per_second
52    }
53    /// <p>Maximum number of characters in a single message, from the request (if specified).</p>
54    pub fn maximum_message_length(&self) -> ::std::option::Option<i32> {
55        self.maximum_message_length
56    }
57    /// <p>Configuration information for optional review of messages.</p>
58    pub fn message_review_handler(&self) -> ::std::option::Option<&crate::types::MessageReviewHandler> {
59        self.message_review_handler.as_ref()
60    }
61    /// <p>Tags attached to the resource, from the request (if specified).</p>
62    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
63        self.tags.as_ref()
64    }
65    /// <p>Array of logging configurations attached to the room, from the request (if specified).</p>
66    ///
67    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.logging_configuration_identifiers.is_none()`.
68    pub fn logging_configuration_identifiers(&self) -> &[::std::string::String] {
69        self.logging_configuration_identifiers.as_deref().unwrap_or_default()
70    }
71}
72impl ::aws_types::request_id::RequestId for CreateRoomOutput {
73    fn request_id(&self) -> Option<&str> {
74        self._request_id.as_deref()
75    }
76}
77impl CreateRoomOutput {
78    /// Creates a new builder-style object to manufacture [`CreateRoomOutput`](crate::operation::create_room::CreateRoomOutput).
79    pub fn builder() -> crate::operation::create_room::builders::CreateRoomOutputBuilder {
80        crate::operation::create_room::builders::CreateRoomOutputBuilder::default()
81    }
82}
83
84/// A builder for [`CreateRoomOutput`](crate::operation::create_room::CreateRoomOutput).
85#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
86#[non_exhaustive]
87pub struct CreateRoomOutputBuilder {
88    pub(crate) arn: ::std::option::Option<::std::string::String>,
89    pub(crate) id: ::std::option::Option<::std::string::String>,
90    pub(crate) name: ::std::option::Option<::std::string::String>,
91    pub(crate) create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
92    pub(crate) update_time: ::std::option::Option<::aws_smithy_types::DateTime>,
93    pub(crate) maximum_message_rate_per_second: ::std::option::Option<i32>,
94    pub(crate) maximum_message_length: ::std::option::Option<i32>,
95    pub(crate) message_review_handler: ::std::option::Option<crate::types::MessageReviewHandler>,
96    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
97    pub(crate) logging_configuration_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
98    _request_id: Option<String>,
99}
100impl CreateRoomOutputBuilder {
101    /// <p>Room ARN, assigned by the system.</p>
102    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
103        self.arn = ::std::option::Option::Some(input.into());
104        self
105    }
106    /// <p>Room ARN, assigned by the system.</p>
107    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
108        self.arn = input;
109        self
110    }
111    /// <p>Room ARN, assigned by the system.</p>
112    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
113        &self.arn
114    }
115    /// <p>Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.</p>
116    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
117        self.id = ::std::option::Option::Some(input.into());
118        self
119    }
120    /// <p>Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.</p>
121    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
122        self.id = input;
123        self
124    }
125    /// <p>Room ID, generated by the system. This is a relative identifier, the part of the ARN that uniquely identifies the room.</p>
126    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
127        &self.id
128    }
129    /// <p>Room name, from the request (if specified).</p>
130    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
131        self.name = ::std::option::Option::Some(input.into());
132        self
133    }
134    /// <p>Room name, from the request (if specified).</p>
135    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
136        self.name = input;
137        self
138    }
139    /// <p>Room name, from the request (if specified).</p>
140    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
141        &self.name
142    }
143    /// <p>Time when the room was created. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
144    pub fn create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
145        self.create_time = ::std::option::Option::Some(input);
146        self
147    }
148    /// <p>Time when the room was created. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
149    pub fn set_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
150        self.create_time = input;
151        self
152    }
153    /// <p>Time when the room was created. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
154    pub fn get_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
155        &self.create_time
156    }
157    /// <p>Time of the room’s last update. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
158    pub fn update_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
159        self.update_time = ::std::option::Option::Some(input);
160        self
161    }
162    /// <p>Time of the room’s last update. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
163    pub fn set_update_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
164        self.update_time = input;
165        self
166    }
167    /// <p>Time of the room’s last update. This is an ISO 8601 timestamp; <i>note that this is returned as a string</i>.</p>
168    pub fn get_update_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
169        &self.update_time
170    }
171    /// <p>Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).</p>
172    pub fn maximum_message_rate_per_second(mut self, input: i32) -> Self {
173        self.maximum_message_rate_per_second = ::std::option::Option::Some(input);
174        self
175    }
176    /// <p>Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).</p>
177    pub fn set_maximum_message_rate_per_second(mut self, input: ::std::option::Option<i32>) -> Self {
178        self.maximum_message_rate_per_second = input;
179        self
180    }
181    /// <p>Maximum number of messages per second that can be sent to the room (by all clients), from the request (if specified).</p>
182    pub fn get_maximum_message_rate_per_second(&self) -> &::std::option::Option<i32> {
183        &self.maximum_message_rate_per_second
184    }
185    /// <p>Maximum number of characters in a single message, from the request (if specified).</p>
186    pub fn maximum_message_length(mut self, input: i32) -> Self {
187        self.maximum_message_length = ::std::option::Option::Some(input);
188        self
189    }
190    /// <p>Maximum number of characters in a single message, from the request (if specified).</p>
191    pub fn set_maximum_message_length(mut self, input: ::std::option::Option<i32>) -> Self {
192        self.maximum_message_length = input;
193        self
194    }
195    /// <p>Maximum number of characters in a single message, from the request (if specified).</p>
196    pub fn get_maximum_message_length(&self) -> &::std::option::Option<i32> {
197        &self.maximum_message_length
198    }
199    /// <p>Configuration information for optional review of messages.</p>
200    pub fn message_review_handler(mut self, input: crate::types::MessageReviewHandler) -> Self {
201        self.message_review_handler = ::std::option::Option::Some(input);
202        self
203    }
204    /// <p>Configuration information for optional review of messages.</p>
205    pub fn set_message_review_handler(mut self, input: ::std::option::Option<crate::types::MessageReviewHandler>) -> Self {
206        self.message_review_handler = input;
207        self
208    }
209    /// <p>Configuration information for optional review of messages.</p>
210    pub fn get_message_review_handler(&self) -> &::std::option::Option<crate::types::MessageReviewHandler> {
211        &self.message_review_handler
212    }
213    /// Adds a key-value pair to `tags`.
214    ///
215    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
216    ///
217    /// <p>Tags attached to the resource, from the request (if specified).</p>
218    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
219        let mut hash_map = self.tags.unwrap_or_default();
220        hash_map.insert(k.into(), v.into());
221        self.tags = ::std::option::Option::Some(hash_map);
222        self
223    }
224    /// <p>Tags attached to the resource, from the request (if specified).</p>
225    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
226        self.tags = input;
227        self
228    }
229    /// <p>Tags attached to the resource, from the request (if specified).</p>
230    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
231        &self.tags
232    }
233    /// Appends an item to `logging_configuration_identifiers`.
234    ///
235    /// To override the contents of this collection use [`set_logging_configuration_identifiers`](Self::set_logging_configuration_identifiers).
236    ///
237    /// <p>Array of logging configurations attached to the room, from the request (if specified).</p>
238    pub fn logging_configuration_identifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
239        let mut v = self.logging_configuration_identifiers.unwrap_or_default();
240        v.push(input.into());
241        self.logging_configuration_identifiers = ::std::option::Option::Some(v);
242        self
243    }
244    /// <p>Array of logging configurations attached to the room, from the request (if specified).</p>
245    pub fn set_logging_configuration_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
246        self.logging_configuration_identifiers = input;
247        self
248    }
249    /// <p>Array of logging configurations attached to the room, from the request (if specified).</p>
250    pub fn get_logging_configuration_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
251        &self.logging_configuration_identifiers
252    }
253    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
254        self._request_id = Some(request_id.into());
255        self
256    }
257
258    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
259        self._request_id = request_id;
260        self
261    }
262    /// Consumes the builder and constructs a [`CreateRoomOutput`](crate::operation::create_room::CreateRoomOutput).
263    pub fn build(self) -> crate::operation::create_room::CreateRoomOutput {
264        crate::operation::create_room::CreateRoomOutput {
265            arn: self.arn,
266            id: self.id,
267            name: self.name,
268            create_time: self.create_time,
269            update_time: self.update_time,
270            maximum_message_rate_per_second: self.maximum_message_rate_per_second,
271            maximum_message_length: self.maximum_message_length,
272            message_review_handler: self.message_review_handler,
273            tags: self.tags,
274            logging_configuration_identifiers: self.logging_configuration_identifiers,
275            _request_id: self._request_id,
276        }
277    }
278}