/*
 * 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 integration account AS2 agreement content.
 *
 */
class AS2AgreementContent {
  /**
   * Create a AS2AgreementContent.
   * @property {object} receiveAgreement The AS2 one-way receive agreement.
   * @property {object} [receiveAgreement.senderBusinessIdentity] The sender
   * business identity
   * @property {string} [receiveAgreement.senderBusinessIdentity.qualifier] The
   * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32
   * @property {string} [receiveAgreement.senderBusinessIdentity.value] The
   * user defined business identity value.
   * @property {object} [receiveAgreement.receiverBusinessIdentity] The
   * receiver business identity
   * @property {string} [receiveAgreement.receiverBusinessIdentity.qualifier]
   * The business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32
   * @property {string} [receiveAgreement.receiverBusinessIdentity.value] The
   * user defined business identity value.
   * @property {object} [receiveAgreement.protocolSettings] The AS2 protocol
   * settings.
   * @property {object}
   * [receiveAgreement.protocolSettings.messageConnectionSettings] The message
   * connection settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch]
   * The value indicating whether to ignore mismatch in certificate name.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue]
   * The value indicating whether to support HTTP status code 'CONTINUE'.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive]
   * The value indicating whether to keep the connection alive.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders]
   * The value indicating whether to unfold the HTTP headers.
   * @property {object}
   * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings] The
   * acknowledgement connection settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch]
   * The value indicating whether to ignore mismatch in certificate name.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue]
   * The value indicating whether to support HTTP status code 'CONTINUE'.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive]
   * The value indicating whether to keep the connection alive.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders]
   * The value indicating whether to unfold the HTTP headers.
   * @property {object} [receiveAgreement.protocolSettings.mdnSettings] The MDN
   * settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.mdnSettings.needMDN] The value
   * indicating whether to send or request a MDN.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.mdnSettings.signMDN] The value
   * indicating whether the MDN needs to be signed or not.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.mdnSettings.sendMDNAsynchronously] The
   * value indicating whether to send the asynchronous MDN.
   * @property {string}
   * [receiveAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The
   * receipt delivery URL.
   * @property {string}
   * [receiveAgreement.protocolSettings.mdnSettings.dispositionNotificationTo]
   * The disposition notification to header value.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.mdnSettings.signOutboundMDNIfOptional]
   * The value indicating whether to sign the outbound MDN if optional.
   * @property {string} [receiveAgreement.protocolSettings.mdnSettings.mdnText]
   * The MDN text.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.mdnSettings.sendInboundMDNToMessageBox]
   * The value indicating whether to send inbound MDN to message box.
   * @property {string}
   * [receiveAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The
   * signing or hashing algorithm. Possible values include: 'NotSpecified',
   * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'
   * @property {object} [receiveAgreement.protocolSettings.securitySettings]
   * The security settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate]
   * The value indicating whether to send or request a MDN.
   * @property {string}
   * [receiveAgreement.protocolSettings.securitySettings.signingCertificateName]
   * The name of the signing certificate.
   * @property {string}
   * [receiveAgreement.protocolSettings.securitySettings.encryptionCertificateName]
   * The name of the encryption certificate.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForInboundEncodedMessages]
   * The value indicating whether to enable NRR for inbound encoded messages.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForInboundDecodedMessages]
   * The value indicating whether to enable NRR for inbound decoded messages.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForOutboundMDN]
   * The value indicating whether to enable NRR for outbound MDN.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForOutboundEncodedMessages]
   * The value indicating whether to enable NRR for outbound encoded messages.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForOutboundDecodedMessages]
   * The value indicating whether to enable NRR for outbound decoded messages.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.securitySettings.enableNRRForInboundMDN]
   * The value indicating whether to enable NRR for inbound MDN.
   * @property {string}
   * [receiveAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat]
   * The Sha2 algorithm format. Valid values are Sha2, ShaHashSize,
   * ShaHyphenHashSize, Sha2UnderscoreHashSize.
   * @property {object} [receiveAgreement.protocolSettings.validationSettings]
   * The validation settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.overrideMessageProperties]
   * The value indicating whether to override incoming message properties with
   * those in agreement.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.encryptMessage] The
   * value indicating whether the message has to be encrypted.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.signMessage] The
   * value indicating whether the message has to be signed.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.compressMessage] The
   * value indicating whether the message has to be compressed.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.checkDuplicateMessage]
   * The value indicating whether to check for duplicate message.
   * @property {number}
   * [receiveAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays]
   * The number of days to look back for duplicate interchange.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend]
   * The value indicating whether to check for certificate revocation list on
   * send.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive]
   * The value indicating whether to check for certificate revocation list on
   * receive.
   * @property {string}
   * [receiveAgreement.protocolSettings.validationSettings.encryptionAlgorithm]
   * The encryption algorithm. Possible values include: 'NotSpecified', 'None',
   * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256'
   * @property {string}
   * [receiveAgreement.protocolSettings.validationSettings.signingAlgorithm]
   * The signing algorithm. Possible values include: 'NotSpecified', 'Default',
   * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'
   * @property {object} [receiveAgreement.protocolSettings.envelopeSettings]
   * The envelope settings.
   * @property {string}
   * [receiveAgreement.protocolSettings.envelopeSettings.messageContentType]
   * The message content type.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader]
   * The value indicating whether to transmit file name in mime header.
   * @property {string}
   * [receiveAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The
   * template for file name.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError]
   * The value indicating whether to suspend message on file name generation
   * error.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.envelopeSettings.autogenerateFileName]
   * The value indicating whether to auto generate file name.
   * @property {object} [receiveAgreement.protocolSettings.errorSettings] The
   * error settings.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.errorSettings.suspendDuplicateMessage]
   * The value indicating whether to suspend duplicate message.
   * @property {boolean}
   * [receiveAgreement.protocolSettings.errorSettings.resendIfMDNNotReceived]
   * The value indicating whether to resend message If MDN is not received.
   * @property {object} sendAgreement The AS2 one-way send agreement.
   * @property {object} [sendAgreement.senderBusinessIdentity] The sender
   * business identity
   * @property {string} [sendAgreement.senderBusinessIdentity.qualifier] The
   * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32
   * @property {string} [sendAgreement.senderBusinessIdentity.value] The user
   * defined business identity value.
   * @property {object} [sendAgreement.receiverBusinessIdentity] The receiver
   * business identity
   * @property {string} [sendAgreement.receiverBusinessIdentity.qualifier] The
   * business identity qualifier e.g. as2identity, ZZ, ZZZ, 31, 32
   * @property {string} [sendAgreement.receiverBusinessIdentity.value] The user
   * defined business identity value.
   * @property {object} [sendAgreement.protocolSettings] The AS2 protocol
   * settings.
   * @property {object}
   * [sendAgreement.protocolSettings.messageConnectionSettings] The message
   * connection settings.
   * @property {boolean}
   * [sendAgreement.protocolSettings.messageConnectionSettings.ignoreCertificateNameMismatch]
   * The value indicating whether to ignore mismatch in certificate name.
   * @property {boolean}
   * [sendAgreement.protocolSettings.messageConnectionSettings.supportHttpStatusCodeContinue]
   * The value indicating whether to support HTTP status code 'CONTINUE'.
   * @property {boolean}
   * [sendAgreement.protocolSettings.messageConnectionSettings.keepHttpConnectionAlive]
   * The value indicating whether to keep the connection alive.
   * @property {boolean}
   * [sendAgreement.protocolSettings.messageConnectionSettings.unfoldHttpHeaders]
   * The value indicating whether to unfold the HTTP headers.
   * @property {object}
   * [sendAgreement.protocolSettings.acknowledgementConnectionSettings] The
   * acknowledgement connection settings.
   * @property {boolean}
   * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.ignoreCertificateNameMismatch]
   * The value indicating whether to ignore mismatch in certificate name.
   * @property {boolean}
   * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.supportHttpStatusCodeContinue]
   * The value indicating whether to support HTTP status code 'CONTINUE'.
   * @property {boolean}
   * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.keepHttpConnectionAlive]
   * The value indicating whether to keep the connection alive.
   * @property {boolean}
   * [sendAgreement.protocolSettings.acknowledgementConnectionSettings.unfoldHttpHeaders]
   * The value indicating whether to unfold the HTTP headers.
   * @property {object} [sendAgreement.protocolSettings.mdnSettings] The MDN
   * settings.
   * @property {boolean} [sendAgreement.protocolSettings.mdnSettings.needMDN]
   * The value indicating whether to send or request a MDN.
   * @property {boolean} [sendAgreement.protocolSettings.mdnSettings.signMDN]
   * The value indicating whether the MDN needs to be signed or not.
   * @property {boolean}
   * [sendAgreement.protocolSettings.mdnSettings.sendMDNAsynchronously] The
   * value indicating whether to send the asynchronous MDN.
   * @property {string}
   * [sendAgreement.protocolSettings.mdnSettings.receiptDeliveryUrl] The
   * receipt delivery URL.
   * @property {string}
   * [sendAgreement.protocolSettings.mdnSettings.dispositionNotificationTo] The
   * disposition notification to header value.
   * @property {boolean}
   * [sendAgreement.protocolSettings.mdnSettings.signOutboundMDNIfOptional] The
   * value indicating whether to sign the outbound MDN if optional.
   * @property {string} [sendAgreement.protocolSettings.mdnSettings.mdnText]
   * The MDN text.
   * @property {boolean}
   * [sendAgreement.protocolSettings.mdnSettings.sendInboundMDNToMessageBox]
   * The value indicating whether to send inbound MDN to message box.
   * @property {string}
   * [sendAgreement.protocolSettings.mdnSettings.micHashingAlgorithm] The
   * signing or hashing algorithm. Possible values include: 'NotSpecified',
   * 'None', 'MD5', 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'
   * @property {object} [sendAgreement.protocolSettings.securitySettings] The
   * security settings.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.overrideGroupSigningCertificate]
   * The value indicating whether to send or request a MDN.
   * @property {string}
   * [sendAgreement.protocolSettings.securitySettings.signingCertificateName]
   * The name of the signing certificate.
   * @property {string}
   * [sendAgreement.protocolSettings.securitySettings.encryptionCertificateName]
   * The name of the encryption certificate.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForInboundEncodedMessages]
   * The value indicating whether to enable NRR for inbound encoded messages.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForInboundDecodedMessages]
   * The value indicating whether to enable NRR for inbound decoded messages.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForOutboundMDN]
   * The value indicating whether to enable NRR for outbound MDN.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForOutboundEncodedMessages]
   * The value indicating whether to enable NRR for outbound encoded messages.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForOutboundDecodedMessages]
   * The value indicating whether to enable NRR for outbound decoded messages.
   * @property {boolean}
   * [sendAgreement.protocolSettings.securitySettings.enableNRRForInboundMDN]
   * The value indicating whether to enable NRR for inbound MDN.
   * @property {string}
   * [sendAgreement.protocolSettings.securitySettings.sha2AlgorithmFormat] The
   * Sha2 algorithm format. Valid values are Sha2, ShaHashSize,
   * ShaHyphenHashSize, Sha2UnderscoreHashSize.
   * @property {object} [sendAgreement.protocolSettings.validationSettings] The
   * validation settings.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.overrideMessageProperties]
   * The value indicating whether to override incoming message properties with
   * those in agreement.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.encryptMessage] The
   * value indicating whether the message has to be encrypted.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.signMessage] The value
   * indicating whether the message has to be signed.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.compressMessage] The
   * value indicating whether the message has to be compressed.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.checkDuplicateMessage]
   * The value indicating whether to check for duplicate message.
   * @property {number}
   * [sendAgreement.protocolSettings.validationSettings.interchangeDuplicatesValidityDays]
   * The number of days to look back for duplicate interchange.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnSend]
   * The value indicating whether to check for certificate revocation list on
   * send.
   * @property {boolean}
   * [sendAgreement.protocolSettings.validationSettings.checkCertificateRevocationListOnReceive]
   * The value indicating whether to check for certificate revocation list on
   * receive.
   * @property {string}
   * [sendAgreement.protocolSettings.validationSettings.encryptionAlgorithm]
   * The encryption algorithm. Possible values include: 'NotSpecified', 'None',
   * 'DES3', 'RC2', 'AES128', 'AES192', 'AES256'
   * @property {string}
   * [sendAgreement.protocolSettings.validationSettings.signingAlgorithm] The
   * signing algorithm. Possible values include: 'NotSpecified', 'Default',
   * 'SHA1', 'SHA2256', 'SHA2384', 'SHA2512'
   * @property {object} [sendAgreement.protocolSettings.envelopeSettings] The
   * envelope settings.
   * @property {string}
   * [sendAgreement.protocolSettings.envelopeSettings.messageContentType] The
   * message content type.
   * @property {boolean}
   * [sendAgreement.protocolSettings.envelopeSettings.transmitFileNameInMimeHeader]
   * The value indicating whether to transmit file name in mime header.
   * @property {string}
   * [sendAgreement.protocolSettings.envelopeSettings.fileNameTemplate] The
   * template for file name.
   * @property {boolean}
   * [sendAgreement.protocolSettings.envelopeSettings.suspendMessageOnFileNameGenerationError]
   * The value indicating whether to suspend message on file name generation
   * error.
   * @property {boolean}
   * [sendAgreement.protocolSettings.envelopeSettings.autogenerateFileName] The
   * value indicating whether to auto generate file name.
   * @property {object} [sendAgreement.protocolSettings.errorSettings] The
   * error settings.
   * @property {boolean}
   * [sendAgreement.protocolSettings.errorSettings.suspendDuplicateMessage] The
   * value indicating whether to suspend duplicate message.
   * @property {boolean}
   * [sendAgreement.protocolSettings.errorSettings.resendIfMDNNotReceived] The
   * value indicating whether to resend message If MDN is not received.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AS2AgreementContent
   *
   * @returns {object} metadata of AS2AgreementContent
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AS2AgreementContent',
      type: {
        name: 'Composite',
        className: 'AS2AgreementContent',
        modelProperties: {
          receiveAgreement: {
            required: true,
            serializedName: 'receiveAgreement',
            type: {
              name: 'Composite',
              className: 'AS2OneWayAgreement'
            }
          },
          sendAgreement: {
            required: true,
            serializedName: 'sendAgreement',
            type: {
              name: 'Composite',
              className: 'AS2OneWayAgreement'
            }
          }
        }
      }
    };
  }
}

module.exports = AS2AgreementContent;
