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

  /**
   * Defines the metadata of AS2ProtocolSettings
   *
   * @returns {object} metadata of AS2ProtocolSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AS2ProtocolSettings',
      type: {
        name: 'Composite',
        className: 'AS2ProtocolSettings',
        modelProperties: {
          messageConnectionSettings: {
            required: true,
            serializedName: 'messageConnectionSettings',
            type: {
              name: 'Composite',
              className: 'AS2MessageConnectionSettings'
            }
          },
          acknowledgementConnectionSettings: {
            required: true,
            serializedName: 'acknowledgementConnectionSettings',
            type: {
              name: 'Composite',
              className: 'AS2AcknowledgementConnectionSettings'
            }
          },
          mdnSettings: {
            required: true,
            serializedName: 'mdnSettings',
            type: {
              name: 'Composite',
              className: 'AS2MdnSettings'
            }
          },
          securitySettings: {
            required: true,
            serializedName: 'securitySettings',
            type: {
              name: 'Composite',
              className: 'AS2SecuritySettings'
            }
          },
          validationSettings: {
            required: true,
            serializedName: 'validationSettings',
            type: {
              name: 'Composite',
              className: 'AS2ValidationSettings'
            }
          },
          envelopeSettings: {
            required: true,
            serializedName: 'envelopeSettings',
            type: {
              name: 'Composite',
              className: 'AS2EnvelopeSettings'
            }
          },
          errorSettings: {
            required: true,
            serializedName: 'errorSettings',
            type: {
              name: 'Composite',
              className: 'AS2ErrorSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = AS2ProtocolSettings;
