/*
 * 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';

/**
 * Represents the correlation filter expression.
 *
 */
class CorrelationFilter {
  /**
   * Create a CorrelationFilter.
   * @property {object} [properties] dictionary object for custom filters
   * @property {string} [correlationId] Identifier of the correlation.
   * @property {string} [messageId] Identifier of the message.
   * @property {string} [to] Address to send to.
   * @property {string} [replyTo] Address of the queue to reply to.
   * @property {string} [label] Application specific label.
   * @property {string} [sessionId] Session identifier.
   * @property {string} [replyToSessionId] Session identifier to reply to.
   * @property {string} [contentType] Content type of the message.
   * @property {boolean} [requiresPreprocessing] Value that indicates whether
   * the rule action requires preprocessing. Default value: true .
   */
  constructor() {
  }

  /**
   * Defines the metadata of CorrelationFilter
   *
   * @returns {object} metadata of CorrelationFilter
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CorrelationFilter',
      type: {
        name: 'Composite',
        className: 'CorrelationFilter',
        modelProperties: {
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          correlationId: {
            required: false,
            serializedName: 'correlationId',
            type: {
              name: 'String'
            }
          },
          messageId: {
            required: false,
            serializedName: 'messageId',
            type: {
              name: 'String'
            }
          },
          to: {
            required: false,
            serializedName: 'to',
            type: {
              name: 'String'
            }
          },
          replyTo: {
            required: false,
            serializedName: 'replyTo',
            type: {
              name: 'String'
            }
          },
          label: {
            required: false,
            serializedName: 'label',
            type: {
              name: 'String'
            }
          },
          sessionId: {
            required: false,
            serializedName: 'sessionId',
            type: {
              name: 'String'
            }
          },
          replyToSessionId: {
            required: false,
            serializedName: 'replyToSessionId',
            type: {
              name: 'String'
            }
          },
          contentType: {
            required: false,
            serializedName: 'contentType',
            type: {
              name: 'String'
            }
          },
          requiresPreprocessing: {
            required: false,
            serializedName: 'requiresPreprocessing',
            defaultValue: true,
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = CorrelationFilter;
