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