/*
 * 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 date/time value of a partition.
 *
 * @extends models['DatasetPartitionValue']
 */
class DatasetDateTimePartitionValue extends models['DatasetPartitionValue'] {
  /**
   * Create a DatasetDateTimePartitionValue.
   * @member {object} [date] Name of variable containing date. Type: string (or
   * Expression with resultType string).
   * @member {object} [format] Format string for the Date value. Type: string
   * (or Expression with resultType string).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DatasetDateTimePartitionValue
   *
   * @returns {object} metadata of DatasetDateTimePartitionValue
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DateTime',
      type: {
        name: 'Composite',
        className: 'DatasetDateTimePartitionValue',
        modelProperties: {
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          date: {
            required: false,
            serializedName: 'date',
            type: {
              name: 'Object'
            }
          },
          format: {
            required: false,
            serializedName: 'format',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = DatasetDateTimePartitionValue;
