swift_mt_message/fields/
field77.rs

1use serde::{Deserialize, Serialize};
2use swift_mt_message_macros::SwiftField;
3
4///   **Field 77: Narrative and Envelope Contents**
5///
6/// ## Purpose
7/// Provides extended narrative information and envelope contents for various financial
8/// messages. This field family supports detailed documentation, regulatory information,
9/// and structured content that requires more extensive text than standard narrative fields.
10/// Essential for compliance, documentation, and detailed communication requirements.
11///
12/// ## Field Options Overview
13/// - **Field 77T**: Envelope Contents - structured envelope information
14/// - **Field 77A**: Narrative - extended narrative text (20 lines)
15/// - **Field 77B**: Narrative - shorter narrative text (3 lines)
16///
17/// ## Business Context Applications
18/// - **Regulatory Documentation**: Detailed regulatory and compliance information
19/// - **Trade Finance**: Extended trade documentation and terms
20/// - **Complex Instructions**: Detailed processing instructions
21/// - **Legal Documentation**: Legal terms and conditions
22///
23/// ## Network Validation Requirements
24/// - **Format Compliance**: Each variant has specific format requirements
25/// - **Character Set**: Must use valid SWIFT character set
26/// - **Length Restrictions**: Varying length limits for different options
27/// - **Content Validation**: Content must be relevant and appropriate
28///
29/// ## See Also
30/// - Swift FIN User Handbook: Narrative Field Specifications
31/// - Regulatory Documentation: Compliance Information Requirements
32/// - Trade Finance: Documentary Requirements
33/// - Message Documentation: Extended Information Standards
34///   **Field 77T: Envelope Contents**
35///
36/// Contains structured envelope information with specific format requirements.
37/// Used for regulatory and compliance documentation with extensive content capacity.
38#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftField)]
39pub struct Field77T {
40    /// Envelope content
41    ///
42    /// Format: 9000z - Up to 9000 characters with specific structure
43    /// Contains structured regulatory and compliance information
44    #[component("9000z")]
45    pub envelope_content: String,
46}
47
48///   **Field 77A: Extended Narrative**
49///
50/// Provides extended narrative information with up to 20 lines of text.
51/// Used for detailed documentation and extensive information requirements.
52#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftField)]
53pub struct Field77A {
54    /// Extended narrative content
55    ///
56    /// Format: 20*35x - Up to 20 lines of 35 characters each
57    /// Contains detailed documentation and extended information
58    #[component("20*35x")]
59    pub narrative: Vec<String>,
60}
61
62///   **Field 77B: Short Narrative**
63///
64/// Provides shorter narrative information with up to 3 lines of text.
65/// Used for concise documentation and brief additional information.
66#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, SwiftField)]
67pub struct Field77B {
68    /// Short narrative content
69    ///
70    /// Format: 3*35x - Up to 3 lines of 35 characters each
71    /// Contains brief additional information and documentation
72    #[component("3*35x")]
73    pub narrative: Vec<String>,
74}