aws_sdk_chime/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)]
5pub struct UpdateRoomInput {
6    /// <p>The Amazon Chime account ID.</p>
7    pub account_id: ::std::option::Option<::std::string::String>,
8    /// <p>The room ID.</p>
9    pub room_id: ::std::option::Option<::std::string::String>,
10    /// <p>The room name.</p>
11    pub name: ::std::option::Option<::std::string::String>,
12}
13impl UpdateRoomInput {
14    /// <p>The Amazon Chime account ID.</p>
15    pub fn account_id(&self) -> ::std::option::Option<&str> {
16        self.account_id.as_deref()
17    }
18    /// <p>The room ID.</p>
19    pub fn room_id(&self) -> ::std::option::Option<&str> {
20        self.room_id.as_deref()
21    }
22    /// <p>The room name.</p>
23    pub fn name(&self) -> ::std::option::Option<&str> {
24        self.name.as_deref()
25    }
26}
27impl ::std::fmt::Debug for UpdateRoomInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("UpdateRoomInput");
30        formatter.field("account_id", &self.account_id);
31        formatter.field("room_id", &self.room_id);
32        formatter.field("name", &"*** Sensitive Data Redacted ***");
33        formatter.finish()
34    }
35}
36impl UpdateRoomInput {
37    /// Creates a new builder-style object to manufacture [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
38    pub fn builder() -> crate::operation::update_room::builders::UpdateRoomInputBuilder {
39        crate::operation::update_room::builders::UpdateRoomInputBuilder::default()
40    }
41}
42
43/// A builder for [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct UpdateRoomInputBuilder {
47    pub(crate) account_id: ::std::option::Option<::std::string::String>,
48    pub(crate) room_id: ::std::option::Option<::std::string::String>,
49    pub(crate) name: ::std::option::Option<::std::string::String>,
50}
51impl UpdateRoomInputBuilder {
52    /// <p>The Amazon Chime account ID.</p>
53    /// This field is required.
54    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55        self.account_id = ::std::option::Option::Some(input.into());
56        self
57    }
58    /// <p>The Amazon Chime account ID.</p>
59    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60        self.account_id = input;
61        self
62    }
63    /// <p>The Amazon Chime account ID.</p>
64    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
65        &self.account_id
66    }
67    /// <p>The room ID.</p>
68    /// This field is required.
69    pub fn room_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
70        self.room_id = ::std::option::Option::Some(input.into());
71        self
72    }
73    /// <p>The room ID.</p>
74    pub fn set_room_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.room_id = input;
76        self
77    }
78    /// <p>The room ID.</p>
79    pub fn get_room_id(&self) -> &::std::option::Option<::std::string::String> {
80        &self.room_id
81    }
82    /// <p>The room name.</p>
83    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.name = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The room name.</p>
88    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.name = input;
90        self
91    }
92    /// <p>The room name.</p>
93    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
94        &self.name
95    }
96    /// Consumes the builder and constructs a [`UpdateRoomInput`](crate::operation::update_room::UpdateRoomInput).
97    pub fn build(self) -> ::std::result::Result<crate::operation::update_room::UpdateRoomInput, ::aws_smithy_types::error::operation::BuildError> {
98        ::std::result::Result::Ok(crate::operation::update_room::UpdateRoomInput {
99            account_id: self.account_id,
100            room_id: self.room_id,
101            name: self.name,
102        })
103    }
104}
105impl ::std::fmt::Debug for UpdateRoomInputBuilder {
106    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
107        let mut formatter = f.debug_struct("UpdateRoomInputBuilder");
108        formatter.field("account_id", &self.account_id);
109        formatter.field("room_id", &self.room_id);
110        formatter.field("name", &"*** Sensitive Data Redacted ***");
111        formatter.finish()
112    }
113}