You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _finding.rs
    path of file: ./repos/aws-sdk-rust/sdk/accessanalyzer/src/types
    
    the code of the file until where you have to start completion: // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Contains information about a finding.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Finding {
    /// <p>The ID of the finding.</p>
    pub id: ::std::string::String,
    /// <p>The external principal that has access to a resource within the zone of trust.</p>
    pub principal: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The action in the analyzed policy statement that an external principal has permission to use.</p>
    pub action: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The resource that an external principal has access to.</p>
    pub resource: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether the policy that generated the finding allows public access to the resource.</p>
    pub is_public: ::std::option::Option<bool>,
    /// <p>The type of the resource identified in the finding.</p>
    pub resource_type: crate::types::ResourceType,
    /// <p>The condition in the analyzed policy statement that resulted in a finding.</p>
    pub condition: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
    /// <p>The time at which the finding was generated.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The time at which the resource was analyzed.</p>
    pub analyzed_at: ::aws_smithy_types::DateTime,
    /// <p>The time at which the finding was updated.</p>
    pub updated_at: ::aws_smithy_types::DateTime,
    /// <p>The current status of the finding.</p>
    pub status: crate::types::FindingStatus,
    /// <p>The Amazon Web Services account ID that owns the resource.</p>
    pub resource_owner_account: ::std::string::String,
    /// <p>An error.</p>
    pub error: ::std::option::Option<::std::string::String>,
    /// <p>The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.</p>
    pub sources: ::std::option::Option<::std::vec::Vec<crate::types::FindingSource>>,
}
impl Finding {
    /// <p>The ID of the finding.</p>
    pub fn id(&self) -> &str {
        use std::ops::Deref;
        self.id.deref()
    }
    /// <p>The external principal that has access to a resource within the zone of trust.</p>
    pub fn principal(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.principal.as_ref()
    }
    /// <p>The action in the analyzed policy statement that an external pr
    
    pub fn build(self) -> ::std::result::Result<crate::types::Finding, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::Finding {
            id: self.id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field("id", "id was not specified but it is required when building Finding")
            })?,
            principal: self.principal,
            action: self.action,
            resource: self.resource,
            is_public: self.is_public,
            resource_type: self.resource_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource_type",
                    "resource_type was not specified but it is required when building Finding",
                )
            })?,
            condition: self.condition.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "condition",
                    "condition was not specified but it is required when building Finding",
                )
            })?,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building Finding",
                )
            })?,
            analyzed_at: self.analyzed_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "analyzed_at",
                    "analyzed_at was not specified but it is required when building Finding",
                )
            })?,
            updated_at: self.updated_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "updated_at",
                    "updated_at was not specified but it is required when building Finding",
                )
            })?,
            status: self.status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "status",
                    "status was not specified but it is required when building Finding",
                )
            })?,
            resource_owner_account: self.resource_owner_account.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "resource_owner_account",
                    "resource_owner_account was not specified but it is required when building Finding",
                )
            })?,
            error: self.error,
            sources: self.sources,
        })
    }