/// <summary>
 /// Initializes a new instance of the X12ValidationOverride class.
 /// </summary>
 /// <param name="messageId">The message id on which the validation
 /// settings has to be applied.</param>
 /// <param name="validateEdiTypes">The value indicating whether to
 /// validate EDI types.</param>
 /// <param name="validateXsdTypes">The value indicating whether to
 /// validate XSD types.</param>
 /// <param name="allowLeadingAndTrailingSpacesAndZeroes">The value
 /// indicating whether to allow leading and trailing spaces and
 /// zeroes.</param>
 /// <param name="validateCharacterSet">The value indicating whether to
 /// validate character Set.</param>
 /// <param name="trimLeadingAndTrailingSpacesAndZeroes">The value
 /// indicating whether to trim leading and trailing spaces and
 /// zeroes.</param>
 /// <param name="trailingSeparatorPolicy">The trailing separator
 /// policy. Possible values include: 'NotSpecified', 'NotAllowed',
 /// 'Optional', 'Mandatory'</param>
 public X12ValidationOverride(string messageId, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, bool validateCharacterSet, bool trimLeadingAndTrailingSpacesAndZeroes, TrailingSeparatorPolicy trailingSeparatorPolicy)
 {
     MessageId        = messageId;
     ValidateEdiTypes = validateEdiTypes;
     ValidateXsdTypes = validateXsdTypes;
     AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes;
     ValidateCharacterSet = validateCharacterSet;
     TrimLeadingAndTrailingSpacesAndZeroes = trimLeadingAndTrailingSpacesAndZeroes;
     TrailingSeparatorPolicy = trailingSeparatorPolicy;
     CustomInit();
 }
 /// <summary>
 /// Initializes a new instance of the X12ValidationSettings class.
 /// </summary>
 /// <param name="validateCharacterSet">The value indicating whether to
 /// validate character set in the message.</param>
 /// <param name="checkDuplicateInterchangeControlNumber">The value
 /// indicating whether to check for duplicate interchange control
 /// number.</param>
 /// <param name="interchangeControlNumberValidityDays">The validity
 /// period of interchange control number.</param>
 /// <param name="checkDuplicateGroupControlNumber">The value indicating
 /// whether to check for duplicate group control number.</param>
 /// <param name="checkDuplicateTransactionSetControlNumber">The value
 /// indicating whether to check for duplicate transaction set control
 /// number.</param>
 /// <param name="validateEdiTypes">The value indicating whether to
 /// Whether to validate EDI types.</param>
 /// <param name="validateXsdTypes">The value indicating whether to
 /// Whether to validate XSD types.</param>
 /// <param name="allowLeadingAndTrailingSpacesAndZeroes">The value
 /// indicating whether to allow leading and trailing spaces and
 /// zeroes.</param>
 /// <param name="trimLeadingAndTrailingSpacesAndZeroes">The value
 /// indicating whether to trim leading and trailing spaces and
 /// zeroes.</param>
 /// <param name="trailingSeparatorPolicy">The trailing separator
 /// policy. Possible values include: 'NotSpecified', 'NotAllowed',
 /// 'Optional', 'Mandatory'</param>
 public X12ValidationSettings(bool validateCharacterSet, bool checkDuplicateInterchangeControlNumber, int interchangeControlNumberValidityDays, bool checkDuplicateGroupControlNumber, bool checkDuplicateTransactionSetControlNumber, bool validateEdiTypes, bool validateXsdTypes, bool allowLeadingAndTrailingSpacesAndZeroes, bool trimLeadingAndTrailingSpacesAndZeroes, TrailingSeparatorPolicy trailingSeparatorPolicy)
 {
     ValidateCharacterSet = validateCharacterSet;
     CheckDuplicateInterchangeControlNumber    = checkDuplicateInterchangeControlNumber;
     InterchangeControlNumberValidityDays      = interchangeControlNumberValidityDays;
     CheckDuplicateGroupControlNumber          = checkDuplicateGroupControlNumber;
     CheckDuplicateTransactionSetControlNumber = checkDuplicateTransactionSetControlNumber;
     ValidateEdiTypes = validateEdiTypes;
     ValidateXsdTypes = validateXsdTypes;
     AllowLeadingAndTrailingSpacesAndZeroes = allowLeadingAndTrailingSpacesAndZeroes;
     TrimLeadingAndTrailingSpacesAndZeroes  = trimLeadingAndTrailingSpacesAndZeroes;
     TrailingSeparatorPolicy = trailingSeparatorPolicy;
     CustomInit();
 }
        internal static string ToSerializedValue(this TrailingSeparatorPolicy value)
        {
            switch (value)
            {
            case TrailingSeparatorPolicy.NotSpecified:
                return("NotSpecified");

            case TrailingSeparatorPolicy.NotAllowed:
                return("NotAllowed");

            case TrailingSeparatorPolicy.Optional:
                return("Optional");

            case TrailingSeparatorPolicy.Mandatory:
                return("Mandatory");
            }
            return(null);
        }