fn msg_att_static(input: &[u8]) -> IResult<&[u8], DataItemResponse> {
    alt((
        map(
            tuple((tag_no_case(b"ENVELOPE"), SP, envelope)),
            |(_, _, envelope)| DataItemResponse::Envelope(envelope),
        ),
        map(
            tuple((tag_no_case(b"INTERNALDATE"), SP, date_time)),
            |(_, _, date_time)| DataItemResponse::InternalDate(date_time),
        ),
        alt((
            map(
                tuple((tag_no_case(b"RFC822.HEADER"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822Header(nstring.to_owned()),
            ),
            map(
                tuple((tag_no_case(b"RFC822.TEXT"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822Text(nstring.to_owned()),
            ),
            map(
                tuple((tag_no_case(b"RFC822"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822(nstring.to_owned()),
            ),
        )),
        map(
            tuple((tag_no_case(b"RFC822.SIZE"), SP, number)),
            |(_, _, num)| DataItemResponse::Rfc822Size(num),
        ),
        alt((
            map(
                tuple((tag_no_case(b"BODYSTRUCTURE"), SP, body(8))),
                |(_, _, body)| DataItemResponse::BodyStructure(body),
            ),
            map(
                tuple((tag_no_case(b"BODY"), SP, body(8))),
                |(_, _, body)| DataItemResponse::Body(body),
            ),
        )),
        map(
            tuple((
                tag_no_case(b"BODY"),
                section,
                opt(delimited(tag(b"<"), number, tag(b">"))),
                SP,
                nstring,
            )),
            |(_, section, origin, _, data)| DataItemResponse::BodyExt {
                section,
                origin,
                data: data.to_owned(),
            },
        ),
        map(tuple((tag_no_case(b"UID"), SP, uniqueid)), |(_, _, uid)| {
            DataItemResponse::Uid(uid)
        }),
    ))(input)
}
/// msg-att-static = "ENVELOPE" SP envelope /
///                  "INTERNALDATE" SP date-time /
///                  "RFC822" [".HEADER" / ".TEXT"] SP nstring /
///                  "RFC822.SIZE" SP number /
///                  "BODY" ["STRUCTURE"] SP body /
///                  "BODY" section ["<" number ">"] SP nstring /
///                  "UID" SP uniqueid
///
/// Note: MUST NOT change for a message


MUST NOT change for a message
MUST NOT change for a message
fn msg_att_static(input: &[u8]) -> IResult<&[u8], DataItemResponse> {
    alt((
        map(
            tuple((tag_no_case(b"ENVELOPE"), SP, envelope)),
            |(_, _, envelope)| DataItemResponse::Envelope(envelope),
        ),
        map(
            tuple((tag_no_case(b"INTERNALDATE"), SP, date_time)),
            |(_, _, date_time)| DataItemResponse::InternalDate(date_time),
        ),
        alt((
            map(
                tuple((tag_no_case(b"RFC822.HEADER"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822Header(nstring.to_owned()),
            ),
            map(
                tuple((tag_no_case(b"RFC822.TEXT"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822Text(nstring.to_owned()),
            ),
            map(
                tuple((tag_no_case(b"RFC822"), SP, nstring)),
                |(_, _, nstring)| DataItemResponse::Rfc822(nstring.to_owned()),
            ),
        )),
        map(
            tuple((tag_no_case(b"RFC822.SIZE"), SP, number)),
            |(_, _, num)| DataItemResponse::Rfc822Size(num),
        ),
        alt((
            map(
                tuple((tag_no_case(b"BODYSTRUCTURE"), SP, body(8))),
                |(_, _, body)| DataItemResponse::BodyStructure(body),
            ),
            map(
                tuple((tag_no_case(b"BODY"), SP, body(8))),
                |(_, _, body)| DataItemResponse::Body(body),
            ),
        )),
        map(
            tuple((
                tag_no_case(b"BODY"),
                section,
                opt(delimited(tag(b"<"), number, tag(b">"))),
                SP,
                nstring,
            )),
            |(_, section, origin, _, data)| DataItemResponse::BodyExt {
                section,
                origin,
                data: data.to_owned(),
            },
        ),
        map(tuple((tag_no_case(b"UID"), SP, uniqueid)), |(_, _, uid)| {
            DataItemResponse::Uid(uid)
        }),
    ))(input)
}
fn msg_att_static ( input : & [ u8 ] ) -> IResult < & [ u8 ] , DataItemResponse > { alt ( ( map ( tuple ( ( tag_no_case ( b" " ) , SP , envelope ) ) , | ( _ , _ , envelope ) | DataItemResponse :: Envelope ( envelope ) , ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , date_time ) ) , | ( _ , _ , date_time ) | DataItemResponse :: InternalDate ( date_time ) , ) , alt ( ( map ( tuple ( ( tag_no_case ( b" " ) , SP , nstring ) ) , | ( _ , _ , nstring ) | DataItemResponse :: Rfc822Header ( nstring . to_owned ( ) ) , ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , nstring ) ) , | ( _ , _ , nstring ) | DataItemResponse :: Rfc822Text ( nstring . to_owned ( ) ) , ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , nstring ) ) , | ( _ , _ , nstring ) | DataItemResponse :: Rfc822 ( nstring . to_owned ( ) ) , ) , ) ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , number ) ) , | ( _ , _ , num ) | DataItemResponse :: Rfc822Size ( num ) , ) , alt ( ( map ( tuple ( ( tag_no_case ( b" " ) , SP , body ( 8 ) ) ) , | ( _ , _ , body ) | DataItemResponse :: BodyStructure ( body ) , ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , body ( 8 ) ) ) , | ( _ , _ , body ) | DataItemResponse :: Body ( body ) , ) , ) ) , map ( tuple ( ( tag_no_case ( b" " ) , section , opt ( delimited ( tag ( b" " ) , number , tag ( b" " ) ) ) , SP , nstring , ) ) , | ( _ , section , origin , _ , data ) | DataItemResponse :: BodyExt { section , origin , data : data . to_owned ( ) , } , ) , map ( tuple ( ( tag_no_case ( b" " ) , SP , uniqueid ) ) , | ( _ , _ , uid ) | { DataItemResponse :: Uid ( uid ) } ) , ) ) ( input ) }
msg-att-static = "ENVELOPE" SP envelope
"INTERNALDATE" SP date-time
"RFC822" [".HEADER" / ".TEXT"] SP nstring
"RFC822.SIZE" SP number
"BODY" ["STRUCTURE"] SP body
"BODY" section ["<" number ">"] SP nstring
"UID" SP uniqueid
msg - att - static = " ENVELOPE " SP envelope " INTERNALDATE " SP date - time " RFC822 " [ " . HEADER " / " . TEXT " ] SP nstring " RFC822 . SIZE " SP number " BODY " [ " STRUCTURE " ] SP body " BODY " section [ " < " number " > " ] SP nstring " UID " SP uniqueid
input
&[u8]