aws_sdk_repostspace/operation/send_invites/
_send_invites_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 SendInvitesInput {
6    /// <p>The ID of the private re:Post.</p>
7    pub space_id: ::std::option::Option<::std::string::String>,
8    /// <p>The array of identifiers for the users and groups.</p>
9    pub accessor_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The title of the invite.</p>
11    pub title: ::std::option::Option<::std::string::String>,
12    /// <p>The body of the invite.</p>
13    pub body: ::std::option::Option<::std::string::String>,
14}
15impl SendInvitesInput {
16    /// <p>The ID of the private re:Post.</p>
17    pub fn space_id(&self) -> ::std::option::Option<&str> {
18        self.space_id.as_deref()
19    }
20    /// <p>The array of identifiers for the users and groups.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.accessor_ids.is_none()`.
23    pub fn accessor_ids(&self) -> &[::std::string::String] {
24        self.accessor_ids.as_deref().unwrap_or_default()
25    }
26    /// <p>The title of the invite.</p>
27    pub fn title(&self) -> ::std::option::Option<&str> {
28        self.title.as_deref()
29    }
30    /// <p>The body of the invite.</p>
31    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    /// Creates a new builder-style object to manufacture [`SendInvitesInput`](crate::operation::send_invites::SendInvitesInput).
47    pub fn builder() -> crate::operation::send_invites::builders::SendInvitesInputBuilder {
48        crate::operation::send_invites::builders::SendInvitesInputBuilder::default()
49    }
50}
51
52/// A builder for [`SendInvitesInput`](crate::operation::send_invites::SendInvitesInput).
53#[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    /// <p>The ID of the private re:Post.</p>
63    /// This field is required.
64    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    /// <p>The ID of the private re:Post.</p>
69    pub fn set_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
70        self.space_id = input;
71        self
72    }
73    /// <p>The ID of the private re:Post.</p>
74    pub fn get_space_id(&self) -> &::std::option::Option<::std::string::String> {
75        &self.space_id
76    }
77    /// Appends an item to `accessor_ids`.
78    ///
79    /// To override the contents of this collection use [`set_accessor_ids`](Self::set_accessor_ids).
80    ///
81    /// <p>The array of identifiers for the users and groups.</p>
82    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    /// <p>The array of identifiers for the users and groups.</p>
89    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    /// <p>The array of identifiers for the users and groups.</p>
94    pub fn get_accessor_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
95        &self.accessor_ids
96    }
97    /// <p>The title of the invite.</p>
98    /// This field is required.
99    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    /// <p>The title of the invite.</p>
104    pub fn set_title(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
105        self.title = input;
106        self
107    }
108    /// <p>The title of the invite.</p>
109    pub fn get_title(&self) -> &::std::option::Option<::std::string::String> {
110        &self.title
111    }
112    /// <p>The body of the invite.</p>
113    /// This field is required.
114    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    /// <p>The body of the invite.</p>
119    pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.body = input;
121        self
122    }
123    /// <p>The body of the invite.</p>
124    pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
125        &self.body
126    }
127    /// Consumes the builder and constructs a [`SendInvitesInput`](crate::operation::send_invites::SendInvitesInput).
128    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}