aws-sdk-accessanalyzer 1.106.0

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

/// <p>The response to the request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAnalyzedResourceOutput {
    /// <p>An <code>AnalyzedResource</code> object that contains information that IAM Access Analyzer found when it analyzed the resource.</p>
    pub resource: ::std::option::Option<crate::types::AnalyzedResource>,
    _request_id: Option<String>,
}
impl GetAnalyzedResourceOutput {
    /// <p>An <code>AnalyzedResource</code> object that contains information that IAM Access Analyzer found when it analyzed the resource.</p>
    pub fn resource(&self) -> ::std::option::Option<&crate::types::AnalyzedResource> {
        self.resource.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetAnalyzedResourceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetAnalyzedResourceOutput {
    /// Creates a new builder-style object to manufacture [`GetAnalyzedResourceOutput`](crate::operation::get_analyzed_resource::GetAnalyzedResourceOutput).
    pub fn builder() -> crate::operation::get_analyzed_resource::builders::GetAnalyzedResourceOutputBuilder {
        crate::operation::get_analyzed_resource::builders::GetAnalyzedResourceOutputBuilder::default()
    }
}

/// A builder for [`GetAnalyzedResourceOutput`](crate::operation::get_analyzed_resource::GetAnalyzedResourceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAnalyzedResourceOutputBuilder {
    pub(crate) resource: ::std::option::Option<crate::types::AnalyzedResource>,
    _request_id: Option<String>,
}
impl GetAnalyzedResourceOutputBuilder {
    /// <p>An <code>AnalyzedResource</code> object that contains information that IAM Access Analyzer found when it analyzed the resource.</p>
    pub fn resource(mut self, input: crate::types::AnalyzedResource) -> Self {
        self.resource = ::std::option::Option::Some(input);
        self
    }
    /// <p>An <code>AnalyzedResource</code> object that contains information that IAM Access Analyzer found when it analyzed the resource.</p>
    pub fn set_resource(mut self, input: ::std::option::Option<crate::types::AnalyzedResource>) -> Self {
        self.resource = input;
        self
    }
    /// <p>An <code>AnalyzedResource</code> object that contains information that IAM Access Analyzer found when it analyzed the resource.</p>
    pub fn get_resource(&self) -> &::std::option::Option<crate::types::AnalyzedResource> {
        &self.resource
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetAnalyzedResourceOutput`](crate::operation::get_analyzed_resource::GetAnalyzedResourceOutput).
    pub fn build(self) -> crate::operation::get_analyzed_resource::GetAnalyzedResourceOutput {
        crate::operation::get_analyzed_resource::GetAnalyzedResourceOutput {
            resource: self.resource,
            _request_id: self._request_id,
        }
    }
}