aws_sdk_ivschat/operation/update_room/
_update_room_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 UpdateRoomInput {
6    /// <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
7    pub identifier: ::std::option::Option<::std::string::String>,
8    /// <p>Room name. The value does not need to be unique.</p>
9    pub name: ::std::option::Option<::std::string::String>,
10    /// <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
11    pub maximum_message_rate_per_second: ::std::option::Option<i32>,
12    /// <p>The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.</p>
13    pub maximum_message_length: ::std::option::Option<i32>,
14    /// <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
15    pub message_review_handler: ::std::option::Option<crate::types::MessageReviewHandler>,
16    /// <p>Array of logging-configuration identifiers attached to the room.</p>
17    pub logging_configuration_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18}
19impl UpdateRoomInput {
20    /// <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
21    pub fn identifier(&self) -> ::std::option::Option<&str> {
22        self.identifier.as_deref()
23    }
24    /// <p>Room name. The value does not need to be unique.</p>
25    pub fn name(&self) -> ::std::option::Option<&str> {
26        self.name.as_deref()
27    }
28    /// <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
29    pub fn maximum_message_rate_per_second(&self) -> ::std::option::Option<i32> {
30        self.maximum_message_rate_per_second
31    }
32    /// <p>The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.</p>
33    pub fn maximum_message_length(&self) -> ::std::option::Option<i32> {
34        self.maximum_message_length
35    }
36    /// <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
37    pub fn message_review_handler(&self) -> ::std::option::Option<&crate::types::MessageReviewHandler> {
38        self.message_review_handler.as_ref()
39    }
40    /// <p>Array of logging-configuration identifiers attached to the room.</p>
41    ///
42    /// 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()`.
43    pub fn logging_configuration_identifiers(&self) -> &[::std::string::String] {
44        self.logging_configuration_identifiers.as_deref().unwrap_or_default()
45    }
46}
47impl UpdateRoomInput {
48    /// Creates a new builder-style object to manufacture [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
49    pub fn builder() -> crate::operation::update_room::builders::UpdateRoomInputBuilder {
50        crate::operation::update_room::builders::UpdateRoomInputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateRoomInputBuilder {
58    pub(crate) identifier: ::std::option::Option<::std::string::String>,
59    pub(crate) name: ::std::option::Option<::std::string::String>,
60    pub(crate) maximum_message_rate_per_second: ::std::option::Option<i32>,
61    pub(crate) maximum_message_length: ::std::option::Option<i32>,
62    pub(crate) message_review_handler: ::std::option::Option<crate::types::MessageReviewHandler>,
63    pub(crate) logging_configuration_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
64}
65impl UpdateRoomInputBuilder {
66    /// <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
67    /// This field is required.
68    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.identifier = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
73    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.identifier = input;
75        self
76    }
77    /// <p>Identifier of the room to be updated. Currently this must be an ARN.</p>
78    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
79        &self.identifier
80    }
81    /// <p>Room name. The value does not need to be unique.</p>
82    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83        self.name = ::std::option::Option::Some(input.into());
84        self
85    }
86    /// <p>Room name. The value does not need to be unique.</p>
87    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
88        self.name = input;
89        self
90    }
91    /// <p>Room name. The value does not need to be unique.</p>
92    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
93        &self.name
94    }
95    /// <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
96    pub fn maximum_message_rate_per_second(mut self, input: i32) -> Self {
97        self.maximum_message_rate_per_second = ::std::option::Option::Some(input);
98        self
99    }
100    /// <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
101    pub fn set_maximum_message_rate_per_second(mut self, input: ::std::option::Option<i32>) -> Self {
102        self.maximum_message_rate_per_second = input;
103        self
104    }
105    /// <p>Maximum number of messages per second that can be sent to the room (by all clients). Default: 10.</p>
106    pub fn get_maximum_message_rate_per_second(&self) -> &::std::option::Option<i32> {
107        &self.maximum_message_rate_per_second
108    }
109    /// <p>The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.</p>
110    pub fn maximum_message_length(mut self, input: i32) -> Self {
111        self.maximum_message_length = ::std::option::Option::Some(input);
112        self
113    }
114    /// <p>The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.</p>
115    pub fn set_maximum_message_length(mut self, input: ::std::option::Option<i32>) -> Self {
116        self.maximum_message_length = input;
117        self
118    }
119    /// <p>The maximum number of characters in a single message. Messages are expected to be UTF-8 encoded and this limit applies specifically to rune/code-point count, not number of bytes. Default: 500.</p>
120    pub fn get_maximum_message_length(&self) -> &::std::option::Option<i32> {
121        &self.maximum_message_length
122    }
123    /// <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
124    pub fn message_review_handler(mut self, input: crate::types::MessageReviewHandler) -> Self {
125        self.message_review_handler = ::std::option::Option::Some(input);
126        self
127    }
128    /// <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
129    pub fn set_message_review_handler(mut self, input: ::std::option::Option<crate::types::MessageReviewHandler>) -> Self {
130        self.message_review_handler = input;
131        self
132    }
133    /// <p>Configuration information for optional review of messages. Specify an empty <code>uri</code> string to disassociate a message review handler from the specified room.</p>
134    pub fn get_message_review_handler(&self) -> &::std::option::Option<crate::types::MessageReviewHandler> {
135        &self.message_review_handler
136    }
137    /// Appends an item to `logging_configuration_identifiers`.
138    ///
139    /// To override the contents of this collection use [`set_logging_configuration_identifiers`](Self::set_logging_configuration_identifiers).
140    ///
141    /// <p>Array of logging-configuration identifiers attached to the room.</p>
142    pub fn logging_configuration_identifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        let mut v = self.logging_configuration_identifiers.unwrap_or_default();
144        v.push(input.into());
145        self.logging_configuration_identifiers = ::std::option::Option::Some(v);
146        self
147    }
148    /// <p>Array of logging-configuration identifiers attached to the room.</p>
149    pub fn set_logging_configuration_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
150        self.logging_configuration_identifiers = input;
151        self
152    }
153    /// <p>Array of logging-configuration identifiers attached to the room.</p>
154    pub fn get_logging_configuration_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
155        &self.logging_configuration_identifiers
156    }
157    /// Consumes the builder and constructs a [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
158    pub fn build(self) -> ::std::result::Result<crate::operation::update_room::UpdateRoomInput, ::aws_smithy_types::error::operation::BuildError> {
159        ::std::result::Result::Ok(crate::operation::update_room::UpdateRoomInput {
160            identifier: self.identifier,
161            name: self.name,
162            maximum_message_rate_per_second: self.maximum_message_rate_per_second,
163            maximum_message_length: self.maximum_message_length,
164            message_review_handler: self.message_review_handler,
165            logging_configuration_identifiers: self.logging_configuration_identifiers,
166        })
167    }
168}