aws-sdk-securityagent 1.2.0

AWS SDK for AWS Security Agent
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Request structure for removing a single member from an agent space.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteMembershipInput {
    /// <p>The unique identifier of the application that contains the agent space.</p>
    pub application_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the agent space to revoke access from.</p>
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the membership to delete.</p>
    pub membership_id: ::std::option::Option<::std::string::String>,
    /// <p>The type of member to remove.</p>
    pub member_type: ::std::option::Option<crate::types::MembershipType>,
}
impl DeleteMembershipInput {
    /// <p>The unique identifier of the application that contains the agent space.</p>
    pub fn application_id(&self) -> ::std::option::Option<&str> {
        self.application_id.as_deref()
    }
    /// <p>The unique identifier of the agent space to revoke access from.</p>
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// <p>The unique identifier of the membership to delete.</p>
    pub fn membership_id(&self) -> ::std::option::Option<&str> {
        self.membership_id.as_deref()
    }
    /// <p>The type of member to remove.</p>
    pub fn member_type(&self) -> ::std::option::Option<&crate::types::MembershipType> {
        self.member_type.as_ref()
    }
}
impl DeleteMembershipInput {
    /// Creates a new builder-style object to manufacture [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
    pub fn builder() -> crate::operation::delete_membership::builders::DeleteMembershipInputBuilder {
        crate::operation::delete_membership::builders::DeleteMembershipInputBuilder::default()
    }
}

/// A builder for [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteMembershipInputBuilder {
    pub(crate) application_id: ::std::option::Option<::std::string::String>,
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) membership_id: ::std::option::Option<::std::string::String>,
    pub(crate) member_type: ::std::option::Option<crate::types::MembershipType>,
}
impl DeleteMembershipInputBuilder {
    /// <p>The unique identifier of the application that contains the agent space.</p>
    /// This field is required.
    pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.application_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the application that contains the agent space.</p>
    pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.application_id = input;
        self
    }
    /// <p>The unique identifier of the application that contains the agent space.</p>
    pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.application_id
    }
    /// <p>The unique identifier of the agent space to revoke access from.</p>
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the agent space to revoke access from.</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier of the agent space to revoke access from.</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <p>The unique identifier of the membership to delete.</p>
    /// This field is required.
    pub fn membership_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.membership_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the membership to delete.</p>
    pub fn set_membership_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.membership_id = input;
        self
    }
    /// <p>The unique identifier of the membership to delete.</p>
    pub fn get_membership_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.membership_id
    }
    /// <p>The type of member to remove.</p>
    pub fn member_type(mut self, input: crate::types::MembershipType) -> Self {
        self.member_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of member to remove.</p>
    pub fn set_member_type(mut self, input: ::std::option::Option<crate::types::MembershipType>) -> Self {
        self.member_type = input;
        self
    }
    /// <p>The type of member to remove.</p>
    pub fn get_member_type(&self) -> &::std::option::Option<crate::types::MembershipType> {
        &self.member_type
    }
    /// Consumes the builder and constructs a [`DeleteMembershipInput`](crate::operation::delete_membership::DeleteMembershipInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_membership::DeleteMembershipInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_membership::DeleteMembershipInput {
            application_id: self.application_id,
            agent_space_id: self.agent_space_id,
            membership_id: self.membership_id,
            member_type: self.member_type,
        })
    }
}