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

/**
 * A Hierarchical Child Entity.
 *
 * @extends models['ChildEntity']
 */
class HierarchicalChildEntity extends models['ChildEntity'] {
  /**
   * Create a HierarchicalChildEntity.
   * @property {number} [typeId] The type ID of the Entity Model.
   * @property {string} [readableType] Possible values include: 'Entity
   * Extractor', 'Hierarchical Entity Extractor', 'Hierarchical Child Entity
   * Extractor', 'Composite Entity Extractor', 'Closed List Entity Extractor',
   * 'Prebuilt Entity Extractor', 'Intent Classifier', 'Pattern.Any Entity
   * Extractor', 'Regex Entity Extractor'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of HierarchicalChildEntity
   *
   * @returns {object} metadata of HierarchicalChildEntity
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'HierarchicalChildEntity',
      type: {
        name: 'Composite',
        className: 'HierarchicalChildEntity',
        modelProperties: {
          id: {
            required: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          typeId: {
            required: false,
            serializedName: 'typeId',
            type: {
              name: 'Number'
            }
          },
          readableType: {
            required: false,
            serializedName: 'readableType',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = HierarchicalChildEntity;
