/*
 * 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 a blob data source.
 *
 */
class BlobDataSourceProperties {
  /**
   * Create a BlobDataSourceProperties.
   * @member {array} [storageAccounts] A list of one or more Azure Storage
   * accounts. Required on PUT (CreateOrReplace) requests.
   * @member {string} [container] The name of a container within the associated
   * Storage account. This container contains either the blob(s) to be read
   * from or written to. Required on PUT (CreateOrReplace) requests.
   * @member {string} [pathPattern] The blob path pattern. Not a regular
   * expression. It represents a pattern against which blob names will be
   * matched to determine whether or not they should be included as input or
   * output to the job. See
   * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-input
   * or
   * https://docs.microsoft.com/en-us/rest/api/streamanalytics/stream-analytics-output
   * for a more detailed explanation and example.
   * @member {string} [dateFormat] The date format. Wherever {date} appears in
   * pathPattern, the value of this property is used as the date format
   * instead.
   * @member {string} [timeFormat] The time format. Wherever {time} appears in
   * pathPattern, the value of this property is used as the time format
   * instead.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BlobDataSourceProperties
   *
   * @returns {object} metadata of BlobDataSourceProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BlobDataSourceProperties',
      type: {
        name: 'Composite',
        className: 'BlobDataSourceProperties',
        modelProperties: {
          storageAccounts: {
            required: false,
            serializedName: 'storageAccounts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StorageAccountElementType',
                  type: {
                    name: 'Composite',
                    className: 'StorageAccount'
                  }
              }
            }
          },
          container: {
            required: false,
            serializedName: 'container',
            type: {
              name: 'String'
            }
          },
          pathPattern: {
            required: false,
            serializedName: 'pathPattern',
            type: {
              name: 'String'
            }
          },
          dateFormat: {
            required: false,
            serializedName: 'dateFormat',
            type: {
              name: 'String'
            }
          },
          timeFormat: {
            required: false,
            serializedName: 'timeFormat',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = BlobDataSourceProperties;
