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

  /**
   * Defines the metadata of AS2OneWayAgreement
   *
   * @returns {object} metadata of AS2OneWayAgreement
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AS2OneWayAgreement',
      type: {
        name: 'Composite',
        className: 'AS2OneWayAgreement',
        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: 'AS2ProtocolSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = AS2OneWayAgreement;
