Skip to main content

aws_sdk_securityagent/operation/delete_membership/
_delete_membership_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Request structure for removing a single member from an agent space.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DeleteMembershipInput {
7    /// <p>The unique identifier of the application that contains the agent space.</p>
8    pub application_id: ::std::option::Option<::std::string::String>,
9    /// <p>The unique identifier of the agent space to revoke access from.</p>
10    pub agent_space_id: ::std::option::Option<::std::string::String>,
11    /// <p>The unique identifier of the membership to delete.</p>
12    pub membership_id: ::std::option::Option<::std::string::String>,
13    /// <p>The type of member to remove.</p>
14    pub member_type: ::std::option::Option<crate::types::MembershipType>,
15}
16impl DeleteMembershipInput {
17    /// <p>The unique identifier of the application that contains the agent space.</p>
18    pub fn application_id(&self) -> ::std::option::Option<&str> {
19        self.application_id.as_deref()
20    }
21    /// <p>The unique identifier of the agent space to revoke access from.</p>
22    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
23        self.agent_space_id.as_deref()
24    }
25    /// <p>The unique identifier of the membership to delete.</p>
26    pub fn membership_id(&self) -> ::std::option::Option<&str> {
27        self.membership_id.as_deref()
28    }
29    /// <p>The type of member to remove.</p>
30    pub fn member_type(&self) -> ::std::option::Option<&crate::types::MembershipType> {
31        self.member_type.as_ref()
32    }
33}
34impl DeleteMembershipInput {
35    /// Creates a new builder-style object to manufacture [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
36    pub fn builder() -> crate::operation::delete_membership::builders::DeleteMembershipInputBuilder {
37        crate::operation::delete_membership::builders::DeleteMembershipInputBuilder::default()
38    }
39}
40
41/// A builder for [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
43#[non_exhaustive]
44pub struct DeleteMembershipInputBuilder {
45    pub(crate) application_id: ::std::option::Option<::std::string::String>,
46    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
47    pub(crate) membership_id: ::std::option::Option<::std::string::String>,
48    pub(crate) member_type: ::std::option::Option<crate::types::MembershipType>,
49}
50impl DeleteMembershipInputBuilder {
51    /// <p>The unique identifier of the application that contains the agent space.</p>
52    /// This field is required.
53    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.application_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <p>The unique identifier of the application that contains the agent space.</p>
58    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.application_id = input;
60        self
61    }
62    /// <p>The unique identifier of the application that contains the agent space.</p>
63    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.application_id
65    }
66    /// <p>The unique identifier of the agent space to revoke access from.</p>
67    /// This field is required.
68    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.agent_space_id = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>The unique identifier of the agent space to revoke access from.</p>
73    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.agent_space_id = input;
75        self
76    }
77    /// <p>The unique identifier of the agent space to revoke access from.</p>
78    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
79        &self.agent_space_id
80    }
81    /// <p>The unique identifier of the membership to delete.</p>
82    /// This field is required.
83    pub fn membership_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.membership_id = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The unique identifier of the membership to delete.</p>
88    pub fn set_membership_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.membership_id = input;
90        self
91    }
92    /// <p>The unique identifier of the membership to delete.</p>
93    pub fn get_membership_id(&self) -> &::std::option::Option<::std::string::String> {
94        &self.membership_id
95    }
96    /// <p>The type of member to remove.</p>
97    pub fn member_type(mut self, input: crate::types::MembershipType) -> Self {
98        self.member_type = ::std::option::Option::Some(input);
99        self
100    }
101    /// <p>The type of member to remove.</p>
102    pub fn set_member_type(mut self, input: ::std::option::Option<crate::types::MembershipType>) -> Self {
103        self.member_type = input;
104        self
105    }
106    /// <p>The type of member to remove.</p>
107    pub fn get_member_type(&self) -> &::std::option::Option<crate::types::MembershipType> {
108        &self.member_type
109    }
110    /// Consumes the builder and constructs a [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
111    pub fn build(
112        self,
113    ) -> ::std::result::Result<crate::operation::delete_membership::DeleteMembershipInput, ::aws_smithy_types::error::operation::BuildError> {
114        ::std::result::Result::Ok(crate::operation::delete_membership::DeleteMembershipInput {
115            application_id: self.application_id,
116            agent_space_id: self.agent_space_id,
117            membership_id: self.membership_id,
118            member_type: self.member_type,
119        })
120    }
121}