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

/**
 * The properties that are associated with an input containing reference data.
 *
 * @extends models['InputProperties']
 */
class ReferenceInputProperties extends models['InputProperties'] {
  /**
   * Create a ReferenceInputProperties.
   * @member {object} [datasource] Describes an input data source that contains
   * reference data. Required on PUT (CreateOrReplace) requests.
   * @member {string} [datasource.type] Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ReferenceInputProperties
   *
   * @returns {object} metadata of ReferenceInputProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Reference',
      type: {
        name: 'Composite',
        className: 'ReferenceInputProperties',
        modelProperties: {
          serialization: {
            required: false,
            serializedName: 'serialization',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'Serialization',
              className: 'Serialization'
            }
          },
          diagnostics: {
            required: false,
            readOnly: true,
            serializedName: 'diagnostics',
            type: {
              name: 'Composite',
              className: 'Diagnostics'
            }
          },
          etag: {
            required: false,
            readOnly: true,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          datasource: {
            required: false,
            serializedName: 'datasource',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'ReferenceInputDataSource',
              className: 'ReferenceInputDataSource'
            }
          }
        }
      }
    };
  }
}

module.exports = ReferenceInputProperties;
