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

/**
 * The format definition of a storage.
 *
 */
class DatasetStorageFormat {
  /**
   * Create a DatasetStorageFormat.
   * @member {object} [serializer] Serializer. Type: string (or Expression with
   * resultType string).
   * @member {object} [deserializer] Deserializer. Type: string (or Expression
   * with resultType string).
   * @member {string} type Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of DatasetStorageFormat
   *
   * @returns {object} metadata of DatasetStorageFormat
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DatasetStorageFormat',
      type: {
        name: 'Composite',
        additionalProperties: {
          type: {
            name: 'Dictionary',
            value: {
                required: false,
                serializedName: 'ObjectElementType',
                type: {
                  name: 'Object'
                }
            }
          }
        },
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'DatasetStorageFormat',
        className: 'DatasetStorageFormat',
        modelProperties: {
          serializer: {
            required: false,
            serializedName: 'serializer',
            type: {
              name: 'Object'
            }
          },
          deserializer: {
            required: false,
            serializedName: 'deserializer',
            type: {
              name: 'Object'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DatasetStorageFormat;
