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

/**
 * An input object, containing all information associated with the named input.
 * All inputs are contained under a streaming job.
 *
 * @extends models['SubResource']
 */
class Input extends models['SubResource'] {
  /**
   * Create a Input.
   * @member {object} [properties] The properties that are associated with an
   * input. Required on PUT (CreateOrReplace) requests.
   * @member {object} [properties.serialization] Describes how data from an
   * input is serialized or how data is serialized when written to an output.
   * Required on PUT (CreateOrReplace) requests.
   * @member {string} [properties.serialization.type] Polymorphic Discriminator
   * @member {object} [properties.diagnostics] Describes conditions applicable
   * to the Input, Output, or the job overall, that warrant customer attention.
   * @member {array} [properties.diagnostics.conditions] A collection of zero
   * or more conditions applicable to the resource, or to the job overall, that
   * warrant customer attention.
   * @member {string} [properties.etag] The current entity tag for the input.
   * This is an opaque string. You can use it to detect whether the resource
   * has changed between requests. You can also use it in the If-Match or
   * If-None-Match headers for write operations for optimistic concurrency.
   * @member {string} [properties.type] Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of Input
   *
   * @returns {object} metadata of Input
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Input',
      type: {
        name: 'Composite',
        className: 'Input',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'type',
                clientName: 'type'
              },
              uberParent: 'InputProperties',
              className: 'InputProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = Input;
