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: _bot_sort_by.rs
    path of file: ./repos/aws-sdk-rust/sdk/lexmodelsv2/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>Specifies attributes for sorting a list of bots.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BotSortBy {
    /// <p>The attribute to use to sort the list of bots.</p>
    pub attribute: crate::types::BotSortAttribute,
    /// <p>The order to sort the list. You can choose ascending or descending.</p>
    pub order: crate::types::SortOrder,
}
impl BotSortBy {
    /// <p>The attribute to use to sort the list of bots.</p>
    pub fn attribute(&self) -> &crate::types::BotSortAttribute {
        &self.attribute
    }
    /// <p>The order to sort the list. You can choose ascend
    
    pub fn build(self) -> ::std::result::Result<crate::types::BotSortBy, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::BotSortBy {
            attribute: self.attribute.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "attribute",
                    "attribute was not specified but it is required when building BotSortBy",
                )
            })?,
            order: self.order.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "order",
                    "order was not specified but it is required when building BotSortBy",
                )
            })?,
        })
    }