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

  /**
   * Defines the metadata of X12OneWayAgreement
   *
   * @returns {object} metadata of X12OneWayAgreement
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'X12OneWayAgreement',
      type: {
        name: 'Composite',
        className: 'X12OneWayAgreement',
        modelProperties: {
          senderBusinessIdentity: {
            required: true,
            serializedName: 'senderBusinessIdentity',
            type: {
              name: 'Composite',
              className: 'BusinessIdentity'
            }
          },
          receiverBusinessIdentity: {
            required: true,
            serializedName: 'receiverBusinessIdentity',
            type: {
              name: 'Composite',
              className: 'BusinessIdentity'
            }
          },
          protocolSettings: {
            required: true,
            serializedName: 'protocolSettings',
            type: {
              name: 'Composite',
              className: 'X12ProtocolSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = X12OneWayAgreement;
