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

/**
 * Derived from PropertyBatchInfo. Represents the property batch succeeding.
 * Contains the results of any "Get" operations in the batch.
 *
 * @extends models['PropertyBatchInfo']
 */
class SuccessfulPropertyBatchInfo extends models['PropertyBatchInfo'] {
  /**
   * Create a SuccessfulPropertyBatchInfo.
   * @property {object} [properties] A map containing the properties that were
   * requested through any "Get" property batch operations. The key represents
   * the index of the "Get" operation in the original request, in string form.
   * The value is the property. If a property is not found, it will not be in
   * the map.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of SuccessfulPropertyBatchInfo
   *
   * @returns {object} metadata of SuccessfulPropertyBatchInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Successful',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'Kind',
          clientName: 'kind'
        },
        uberParent: 'PropertyBatchInfo',
        className: 'SuccessfulPropertyBatchInfo',
        modelProperties: {
          kind: {
            required: true,
            serializedName: 'Kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'Properties',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'PropertyInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'PropertyInfo'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = SuccessfulPropertyBatchInfo;
