1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
// 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 AssociateS3ResourcesInput {
/// <p>(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.</p>
pub member_account_id: ::std::option::Option<::std::string::String>,
/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.</p>
pub s3_resources: ::std::option::Option<::std::vec::Vec<crate::types::S3ResourceClassification>>,
}
impl AssociateS3ResourcesInput {
/// <p>(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.</p>
pub fn member_account_id(&self) -> ::std::option::Option<&str> {
self.member_account_id.as_deref()
}
/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.</p>
pub fn s3_resources(&self) -> ::std::option::Option<&[crate::types::S3ResourceClassification]> {
self.s3_resources.as_deref()
}
}
impl AssociateS3ResourcesInput {
/// Creates a new builder-style object to manufacture [`AssociateS3ResourcesInput`](crate::operation::associate_s3_resources::AssociateS3ResourcesInput).
pub fn builder() -> crate::operation::associate_s3_resources::builders::AssociateS3ResourcesInputBuilder {
crate::operation::associate_s3_resources::builders::AssociateS3ResourcesInputBuilder::default()
}
}
/// A builder for [`AssociateS3ResourcesInput`](crate::operation::associate_s3_resources::AssociateS3ResourcesInput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AssociateS3ResourcesInputBuilder {
pub(crate) member_account_id: ::std::option::Option<::std::string::String>,
pub(crate) s3_resources: ::std::option::Option<::std::vec::Vec<crate::types::S3ResourceClassification>>,
}
impl AssociateS3ResourcesInputBuilder {
/// <p>(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.</p>
pub fn member_account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.member_account_id = ::std::option::Option::Some(input.into());
self
}
/// <p>(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.</p>
pub fn set_member_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.member_account_id = input;
self
}
/// <p>(Discontinued) The ID of the Amazon Macie Classic member account whose resources you want to associate with Macie Classic.</p>
pub fn get_member_account_id(&self) -> &::std::option::Option<::std::string::String> {
&self.member_account_id
}
/// Appends an item to `s3_resources`.
///
/// To override the contents of this collection use [`set_s3_resources`](Self::set_s3_resources).
///
/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.</p>
pub fn s3_resources(mut self, input: crate::types::S3ResourceClassification) -> Self {
let mut v = self.s3_resources.unwrap_or_default();
v.push(input);
self.s3_resources = ::std::option::Option::Some(v);
self
}
/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.</p>
pub fn set_s3_resources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::S3ResourceClassification>>) -> Self {
self.s3_resources = input;
self
}
/// <p>(Discontinued) The S3 resources that you want to associate with Amazon Macie Classic for monitoring and data classification.</p>
pub fn get_s3_resources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::S3ResourceClassification>> {
&self.s3_resources
}
/// Consumes the builder and constructs a [`AssociateS3ResourcesInput`](crate::operation::associate_s3_resources::AssociateS3ResourcesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::associate_s3_resources::AssociateS3ResourcesInput, ::aws_smithy_http::operation::error::BuildError>
{
::std::result::Result::Ok(crate::operation::associate_s3_resources::AssociateS3ResourcesInput {
member_account_id: self.member_account_id,
s3_resources: self.s3_resources,
})
}
}