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

const models = require('./index');

/**
 * @class
 * Initializes a new instance of the DictionaryDecompounderTokenFilter class.
 * @constructor
 * Decomposes compound words found in many Germanic languages. This token
 * filter is implemented using Apache Lucene.
 *
 * @member {array} wordList The list of words to match against.
 *
 * @member {number} [minWordSize] The minimum word size. Only words longer than
 * this get processed. Default is 5. Maximum is 300. Default value: 5 .
 *
 * @member {number} [minSubwordSize] The minimum subword size. Only subwords
 * longer than this are outputted. Default is 2. Maximum is 300. Default value:
 * 2 .
 *
 * @member {number} [maxSubwordSize] The maximum subword size. Only subwords
 * shorter than this are outputted. Default is 15. Maximum is 300. Default
 * value: 15 .
 *
 * @member {boolean} [onlyLongestMatch] A value indicating whether to add only
 * the longest matching subword to the output. Default is false. Default value:
 * false .
 *
 */
class DictionaryDecompounderTokenFilter extends models['TokenFilter'] {
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DictionaryDecompounderTokenFilter
   *
   * @returns {object} metadata of DictionaryDecompounderTokenFilter
   *
   */
  mapper() 

}

module.exports = DictionaryDecompounderTokenFilter;

{
    return {
      required: false,
      serializedName: '#Microsoft.Azure.Search.DictionaryDecompounderTokenFilter',
      type: {
        name: 'Composite',
        className: 'DictionaryDecompounderTokenFilter',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          odatatype: {
            required: true,
            serializedName: '@odata\\.type',
            type: {
              name: 'String'
            }
          },
          wordList: {
            required: true,
            serializedName: 'wordList',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          minWordSize: {
            required: false,
            serializedName: 'minWordSize',
            defaultValue: 5,
            constraints: {
              InclusiveMaximum: 300
            },
            type: {
              name: 'Number'
            }
          },
          minSubwordSize: {
            required: false,
            serializedName: 'minSubwordSize',
            defaultValue: 2,
            constraints: {
              InclusiveMaximum: 300
            },
            type: {
              name: 'Number'
            }
          },
          maxSubwordSize: {
            required: false,
            serializedName: 'maxSubwordSize',
            defaultValue: 15,
            constraints: {
              InclusiveMaximum: 300
            },
            type: {
              name: 'Number'
            }
          },
          onlyLongestMatch: {
            required: false,
            serializedName: 'onlyLongestMatch',
            defaultValue: false,
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }