/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * The X12 agreement protocol settings.
 *
 */
class X12ProtocolSettings {
  /**
   * Create a X12ProtocolSettings.
   * @property {object} validationSettings The X12 validation settings.
   * @property {boolean} [validationSettings.validateCharacterSet] The value
   * indicating whether to validate character set in the message.
   * @property {boolean}
   * [validationSettings.checkDuplicateInterchangeControlNumber] The value
   * indicating whether to check for duplicate interchange control number.
   * @property {number}
   * [validationSettings.interchangeControlNumberValidityDays] The validity
   * period of interchange control number.
   * @property {boolean} [validationSettings.checkDuplicateGroupControlNumber]
   * The value indicating whether to check for duplicate group control number.
   * @property {boolean}
   * [validationSettings.checkDuplicateTransactionSetControlNumber] The value
   * indicating whether to check for duplicate transaction set control number.
   * @property {boolean} [validationSettings.validateEDITypes] The value
   * indicating whether to Whether to validate EDI types.
   * @property {boolean} [validationSettings.validateXSDTypes] The value
   * indicating whether to Whether to validate XSD types.
   * @property {boolean}
   * [validationSettings.allowLeadingAndTrailingSpacesAndZeroes] The value
   * indicating whether to allow leading and trailing spaces and zeroes.
   * @property {boolean}
   * [validationSettings.trimLeadingAndTrailingSpacesAndZeroes] The value
   * indicating whether to trim leading and trailing spaces and zeroes.
   * @property {string} [validationSettings.trailingSeparatorPolicy] The
   * trailing separator policy. Possible values include: 'NotSpecified',
   * 'NotAllowed', 'Optional', 'Mandatory'
   * @property {object} framingSettings The X12 framing settings.
   * @property {number} [framingSettings.dataElementSeparator] The data element
   * separator.
   * @property {number} [framingSettings.componentSeparator] The component
   * separator.
   * @property {boolean} [framingSettings.replaceSeparatorsInPayload] The value
   * indicating whether to replace separators in payload.
   * @property {number} [framingSettings.replaceCharacter] The replacement
   * character.
   * @property {number} [framingSettings.segmentTerminator] The segment
   * terminator.
   * @property {string} [framingSettings.characterSet] The X12 character set.
   * Possible values include: 'NotSpecified', 'Basic', 'Extended', 'UTF8'
   * @property {string} [framingSettings.segmentTerminatorSuffix] The segment
   * terminator suffix. Possible values include: 'NotSpecified', 'None', 'CR',
   * 'LF', 'CRLF'
   * @property {object} envelopeSettings The X12 envelope settings.
   * @property {number} [envelopeSettings.controlStandardsId] The controls
   * standards id.
   * @property {boolean}
   * [envelopeSettings.useControlStandardsIdAsRepetitionCharacter] The value
   * indicating whether to use control standards id as repetition character.
   * @property {string} [envelopeSettings.senderApplicationId] The sender
   * application id.
   * @property {string} [envelopeSettings.receiverApplicationId] The receiver
   * application id.
   * @property {string} [envelopeSettings.controlVersionNumber] The control
   * version number.
   * @property {number} [envelopeSettings.interchangeControlNumberLowerBound]
   * The interchange  control number lower bound.
   * @property {number} [envelopeSettings.interchangeControlNumberUpperBound]
   * The interchange  control number upper bound.
   * @property {boolean} [envelopeSettings.rolloverInterchangeControlNumber]
   * The value indicating whether to rollover interchange control number.
   * @property {boolean} [envelopeSettings.enableDefaultGroupHeaders] The value
   * indicating whether to enable default group headers.
   * @property {string} [envelopeSettings.functionalGroupId] The functional
   * group id.
   * @property {number} [envelopeSettings.groupControlNumberLowerBound] The
   * group control number lower bound.
   * @property {number} [envelopeSettings.groupControlNumberUpperBound] The
   * group control number upper bound.
   * @property {boolean} [envelopeSettings.rolloverGroupControlNumber] The
   * value indicating whether to rollover group control number.
   * @property {string} [envelopeSettings.groupHeaderAgencyCode] The group
   * header agency code.
   * @property {string} [envelopeSettings.groupHeaderVersion] The group header
   * version.
   * @property {number}
   * [envelopeSettings.transactionSetControlNumberLowerBound] The transaction
   * set control number lower bound.
   * @property {number}
   * [envelopeSettings.transactionSetControlNumberUpperBound] The transaction
   * set control number upper bound.
   * @property {boolean} [envelopeSettings.rolloverTransactionSetControlNumber]
   * The value indicating whether to rollover transaction set control number.
   * @property {string} [envelopeSettings.transactionSetControlNumberPrefix]
   * The transaction set control number prefix.
   * @property {string} [envelopeSettings.transactionSetControlNumberSuffix]
   * The transaction set control number suffix.
   * @property {boolean}
   * [envelopeSettings.overwriteExistingTransactionSetControlNumber] The value
   * indicating whether to overwrite existing transaction set control number.
   * @property {string} [envelopeSettings.groupHeaderDateFormat] The group
   * header date format. Possible values include: 'NotSpecified', 'CCYYMMDD',
   * 'YYMMDD'
   * @property {string} [envelopeSettings.groupHeaderTimeFormat] The group
   * header time format. Possible values include: 'NotSpecified', 'HHMM',
   * 'HHMMSS', 'HHMMSSdd', 'HHMMSSd'
   * @property {string} [envelopeSettings.usageIndicator] The usage indicator.
   * Possible values include: 'NotSpecified', 'Test', 'Information',
   * 'Production'
   * @property {object} acknowledgementSettings The X12 acknowledgment
   * settings.
   * @property {boolean} [acknowledgementSettings.needTechnicalAcknowledgement]
   * The value indicating whether technical acknowledgement is needed.
   * @property {boolean}
   * [acknowledgementSettings.batchTechnicalAcknowledgements] The value
   * indicating whether to batch the technical acknowledgements.
   * @property {boolean}
   * [acknowledgementSettings.needFunctionalAcknowledgement] The value
   * indicating whether functional acknowledgement is needed.
   * @property {string}
   * [acknowledgementSettings.functionalAcknowledgementVersion] The functional
   * acknowledgement version.
   * @property {boolean}
   * [acknowledgementSettings.batchFunctionalAcknowledgements] The value
   * indicating whether to batch functional acknowledgements.
   * @property {boolean}
   * [acknowledgementSettings.needImplementationAcknowledgement] The value
   * indicating whether implementation acknowledgement is needed.
   * @property {string}
   * [acknowledgementSettings.implementationAcknowledgementVersion] The
   * implementation acknowledgement version.
   * @property {boolean}
   * [acknowledgementSettings.batchImplementationAcknowledgements] The value
   * indicating whether to batch implementation acknowledgements.
   * @property {boolean} [acknowledgementSettings.needLoopForValidMessages] The
   * value indicating whether a loop is needed for valid messages.
   * @property {boolean}
   * [acknowledgementSettings.sendSynchronousAcknowledgement] The value
   * indicating whether to send synchronous acknowledgement.
   * @property {string}
   * [acknowledgementSettings.acknowledgementControlNumberPrefix] The
   * acknowledgement control number prefix.
   * @property {string}
   * [acknowledgementSettings.acknowledgementControlNumberSuffix] The
   * acknowledgement control number suffix.
   * @property {number}
   * [acknowledgementSettings.acknowledgementControlNumberLowerBound] The
   * acknowledgement control number lower bound.
   * @property {number}
   * [acknowledgementSettings.acknowledgementControlNumberUpperBound] The
   * acknowledgement control number upper bound.
   * @property {boolean}
   * [acknowledgementSettings.rolloverAcknowledgementControlNumber] The value
   * indicating whether to rollover acknowledgement control number.
   * @property {object} messageFilter The X12 message filter.
   * @property {string} [messageFilter.messageFilterType] The message filter
   * type. Possible values include: 'NotSpecified', 'Include', 'Exclude'
   * @property {object} securitySettings The X12 security settings.
   * @property {string} [securitySettings.authorizationQualifier] The
   * authorization qualifier.
   * @property {string} [securitySettings.authorizationValue] The authorization
   * value.
   * @property {string} [securitySettings.securityQualifier] The security
   * qualifier.
   * @property {string} [securitySettings.passwordValue] The password value.
   * @property {object} processingSettings The X12 processing settings.
   * @property {boolean} [processingSettings.maskSecurityInfo] The value
   * indicating whether to mask security information.
   * @property {boolean} [processingSettings.convertImpliedDecimal] The value
   * indicating whether to convert numerical type to implied decimal.
   * @property {boolean} [processingSettings.preserveInterchange] The value
   * indicating whether to preserve interchange.
   * @property {boolean} [processingSettings.suspendInterchangeOnError] The
   * value indicating whether to suspend interchange on error.
   * @property {boolean}
   * [processingSettings.createEmptyXmlTagsForTrailingSeparators] The value
   * indicating whether to create empty xml tags for trailing separators.
   * @property {boolean} [processingSettings.useDotAsDecimalSeparator] The
   * value indicating whether to use dot as decimal separator.
   * @property {array} [envelopeOverrides] The X12 envelope override settings.
   * @property {array} [validationOverrides] The X12 validation override
   * settings.
   * @property {array} [messageFilterList] The X12 message filter list.
   * @property {array} schemaReferences The X12 schema references.
   * @property {array} [x12DelimiterOverrides] The X12 delimiter override
   * settings.
   */
  constructor() {
  }

  /**
   * Defines the metadata of X12ProtocolSettings
   *
   * @returns {object} metadata of X12ProtocolSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'X12ProtocolSettings',
      type: {
        name: 'Composite',
        className: 'X12ProtocolSettings',
        modelProperties: {
          validationSettings: {
            required: true,
            serializedName: 'validationSettings',
            type: {
              name: 'Composite',
              className: 'X12ValidationSettings'
            }
          },
          framingSettings: {
            required: true,
            serializedName: 'framingSettings',
            type: {
              name: 'Composite',
              className: 'X12FramingSettings'
            }
          },
          envelopeSettings: {
            required: true,
            serializedName: 'envelopeSettings',
            type: {
              name: 'Composite',
              className: 'X12EnvelopeSettings'
            }
          },
          acknowledgementSettings: {
            required: true,
            serializedName: 'acknowledgementSettings',
            type: {
              name: 'Composite',
              className: 'X12AcknowledgementSettings'
            }
          },
          messageFilter: {
            required: true,
            serializedName: 'messageFilter',
            type: {
              name: 'Composite',
              className: 'X12MessageFilter'
            }
          },
          securitySettings: {
            required: true,
            serializedName: 'securitySettings',
            type: {
              name: 'Composite',
              className: 'X12SecuritySettings'
            }
          },
          processingSettings: {
            required: true,
            serializedName: 'processingSettings',
            type: {
              name: 'Composite',
              className: 'X12ProcessingSettings'
            }
          },
          envelopeOverrides: {
            required: false,
            serializedName: 'envelopeOverrides',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X12EnvelopeOverrideElementType',
                  type: {
                    name: 'Composite',
                    className: 'X12EnvelopeOverride'
                  }
              }
            }
          },
          validationOverrides: {
            required: false,
            serializedName: 'validationOverrides',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X12ValidationOverrideElementType',
                  type: {
                    name: 'Composite',
                    className: 'X12ValidationOverride'
                  }
              }
            }
          },
          messageFilterList: {
            required: false,
            serializedName: 'messageFilterList',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X12MessageIdentifierElementType',
                  type: {
                    name: 'Composite',
                    className: 'X12MessageIdentifier'
                  }
              }
            }
          },
          schemaReferences: {
            required: true,
            serializedName: 'schemaReferences',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X12SchemaReferenceElementType',
                  type: {
                    name: 'Composite',
                    className: 'X12SchemaReference'
                  }
              }
            }
          },
          x12DelimiterOverrides: {
            required: false,
            serializedName: 'x12DelimiterOverrides',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'X12DelimiterOverridesElementType',
                  type: {
                    name: 'Composite',
                    className: 'X12DelimiterOverrides'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = X12ProtocolSettings;
