aws_sdk_repostspace/operation/send_invites/
_send_invites_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct SendInvitesInput {
6 pub space_id: ::std::option::Option<::std::string::String>,
8 pub accessor_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 pub title: ::std::option::Option<::std::string::String>,
12 pub body: ::std::option::Option<::std::string::String>,
14}
15impl SendInvitesInput {
16 pub fn space_id(&self) -> ::std::option::Option<&str> {
18 self.space_id.as_deref()
19 }
20 pub fn accessor_ids(&self) -> &[::std::string::String] {
24 self.accessor_ids.as_deref().unwrap_or_default()
25 }
26 pub fn title(&self) -> ::std::option::Option<&str> {
28 self.title.as_deref()
29 }
30 pub fn body(&self) -> ::std::option::Option<&str> {
32 self.body.as_deref()
33 }
34}
35impl ::std::fmt::Debug for SendInvitesInput {
36 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
37 let mut formatter = f.debug_struct("SendInvitesInput");
38 formatter.field("space_id", &self.space_id);
39 formatter.field("accessor_ids", &self.accessor_ids);
40 formatter.field("title", &"*** Sensitive Data Redacted ***");
41 formatter.field("body", &"*** Sensitive Data Redacted ***");
42 formatter.finish()
43 }
44}
45impl SendInvitesInput {
46 pub fn builder() -> crate::operation::send_invites::builders::SendInvitesInputBuilder {
48 crate::operation::send_invites::builders::SendInvitesInputBuilder::default()
49 }
50}
51
52#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
54#[non_exhaustive]
55pub struct SendInvitesInputBuilder {
56 pub(crate) space_id: ::std::option::Option<::std::string::String>,
57 pub(crate) accessor_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
58 pub(crate) title: ::std::option::Option<::std::string::String>,
59 pub(crate) body: ::std::option::Option<::std::string::String>,
60}
61impl SendInvitesInputBuilder {
62 pub fn space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.space_id = ::std::option::Option::Some(input.into());
66 self
67 }
68 pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70 self.space_id = input;
71 self
72 }
73 pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
75 &self.space_id
76 }
77 pub fn accessor_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
83 let mut v = self.accessor_ids.unwrap_or_default();
84 v.push(input.into());
85 self.accessor_ids = ::std::option::Option::Some(v);
86 self
87 }
88 pub fn set_accessor_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
90 self.accessor_ids = input;
91 self
92 }
93 pub fn get_accessor_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
95 &self.accessor_ids
96 }
97 pub fn title(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.title = ::std::option::Option::Some(input.into());
101 self
102 }
103 pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105 self.title = input;
106 self
107 }
108 pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
110 &self.title
111 }
112 pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115 self.body = ::std::option::Option::Some(input.into());
116 self
117 }
118 pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120 self.body = input;
121 self
122 }
123 pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
125 &self.body
126 }
127 pub fn build(self) -> ::std::result::Result<crate::operation::send_invites::SendInvitesInput, ::aws_smithy_types::error::operation::BuildError> {
129 ::std::result::Result::Ok(crate::operation::send_invites::SendInvitesInput {
130 space_id: self.space_id,
131 accessor_ids: self.accessor_ids,
132 title: self.title,
133 body: self.body,
134 })
135 }
136}
137impl ::std::fmt::Debug for SendInvitesInputBuilder {
138 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
139 let mut formatter = f.debug_struct("SendInvitesInputBuilder");
140 formatter.field("space_id", &self.space_id);
141 formatter.field("accessor_ids", &self.accessor_ids);
142 formatter.field("title", &"*** Sensitive Data Redacted ***");
143 formatter.field("body", &"*** Sensitive Data Redacted ***");
144 formatter.finish()
145 }
146}