aws-sdk-workmail 1.97.0

AWS SDK for Amazon WorkMail
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DeleteResourceInput {
    /// <p>The identifier associated with the organization from which the resource is deleted.</p>
    pub organization_id: ::std::option::Option<::std::string::String>,
    /// <p>The identifier of the resource to be deleted.</p>
    /// <p>The identifier can accept <i>ResourceId</i>, or <i>Resourcename</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Resource ID: r-0123456789a0123456789b0123456789</p></li>
    /// <li>
    /// <p>Resource name: resource</p></li>
    /// </ul>
    pub resource_id: ::std::option::Option<::std::string::String>,
}
impl DeleteResourceInput {
    /// <p>The identifier associated with the organization from which the resource is deleted.</p>
    pub fn organization_id(&self) -> ::std::option::Option<&str> {
        self.organization_id.as_deref()
    }
    /// <p>The identifier of the resource to be deleted.</p>
    /// <p>The identifier can accept <i>ResourceId</i>, or <i>Resourcename</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Resource ID: r-0123456789a0123456789b0123456789</p></li>
    /// <li>
    /// <p>Resource name: resource</p></li>
    /// </ul>
    pub fn resource_id(&self) -> ::std::option::Option<&str> {
        self.resource_id.as_deref()
    }
}
impl DeleteResourceInput {
    /// Creates a new builder-style object to manufacture [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
    pub fn builder() -> crate::operation::delete_resource::builders::DeleteResourceInputBuilder {
        crate::operation::delete_resource::builders::DeleteResourceInputBuilder::default()
    }
}

/// A builder for [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteResourceInputBuilder {
    pub(crate) organization_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_id: ::std::option::Option<::std::string::String>,
}
impl DeleteResourceInputBuilder {
    /// <p>The identifier associated with the organization from which the resource is deleted.</p>
    /// This field is required.
    pub fn organization_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.organization_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier associated with the organization from which the resource is deleted.</p>
    pub fn set_organization_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.organization_id = input;
        self
    }
    /// <p>The identifier associated with the organization from which the resource is deleted.</p>
    pub fn get_organization_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.organization_id
    }
    /// <p>The identifier of the resource to be deleted.</p>
    /// <p>The identifier can accept <i>ResourceId</i>, or <i>Resourcename</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Resource ID: r-0123456789a0123456789b0123456789</p></li>
    /// <li>
    /// <p>Resource name: resource</p></li>
    /// </ul>
    /// This field is required.
    pub fn resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The identifier of the resource to be deleted.</p>
    /// <p>The identifier can accept <i>ResourceId</i>, or <i>Resourcename</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Resource ID: r-0123456789a0123456789b0123456789</p></li>
    /// <li>
    /// <p>Resource name: resource</p></li>
    /// </ul>
    pub fn set_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.resource_id = input;
        self
    }
    /// <p>The identifier of the resource to be deleted.</p>
    /// <p>The identifier can accept <i>ResourceId</i>, or <i>Resourcename</i>. The following identity formats are available:</p>
    /// <ul>
    /// <li>
    /// <p>Resource ID: r-0123456789a0123456789b0123456789</p></li>
    /// <li>
    /// <p>Resource name: resource</p></li>
    /// </ul>
    pub fn get_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.resource_id
    }
    /// Consumes the builder and constructs a [`DeleteResourceInput`](crate::operation::delete_resource::DeleteResourceInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_resource::DeleteResourceInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::delete_resource::DeleteResourceInput {
            organization_id: self.organization_id,
            resource_id: self.resource_id,
        })
    }
}