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: _template_v3.rs
    path of file: ./repos/aws-sdk-rust/sdk/pcaconnectorad/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>v3 template schema that uses Key Storage Providers.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TemplateV3 {
    /// <p>Certificate validity describes the validity and renewal periods of a certificate.</p>
    pub certificate_validity: ::std::option::Option<crate::types::CertificateValidity>,
    /// <p>List of templates in Active Directory that are superseded by this template.</p>
    pub superseded_templates: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Private key attributes allow you to specify the algorithm, minimal key length, key spec, ke
    
    pub fn build(self) -> ::std::result::Result<crate::types::TemplateV3, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::TemplateV3 {
            certificate_validity: self.certificate_validity,
            superseded_templates: self.superseded_templates,
            private_key_attributes: self.private_key_attributes,
            private_key_flags: self.private_key_flags,
            enrollment_flags: self.enrollment_flags,
            subject_name_flags: self.subject_name_flags,
            general_flags: self.general_flags,
            hash_algorithm: self.hash_algorithm.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "hash_algorithm",
                    "hash_algorithm was not specified but it is required when building TemplateV3",
                )
            })?,
            extensions: self.extensions,
        })
    }