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

/**
 * Single item in List or Get Consumer group operation
 *
 * @extends models['Resource']
 */
class ConsumerGroup extends models['Resource'] {
  /**
   * Create a ConsumerGroup.
   * @property {date} [createdAt] Exact time the message was created.
   * @property {date} [updatedAt] The exact time the message was updated.
   * @property {string} [userMetadata] User Metadata is a placeholder to store
   * user-defined string data with maximum length 1024. e.g. it can be used to
   * store descriptive data, such as list of teams and their contact
   * information also user-defined configuration settings can be stored.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ConsumerGroup
   *
   * @returns {object} metadata of ConsumerGroup
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConsumerGroup',
      type: {
        name: 'Composite',
        className: 'ConsumerGroup',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          createdAt: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdAt',
            type: {
              name: 'DateTime'
            }
          },
          updatedAt: {
            required: false,
            readOnly: true,
            serializedName: 'properties.updatedAt',
            type: {
              name: 'DateTime'
            }
          },
          userMetadata: {
            required: false,
            serializedName: 'properties.userMetadata',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ConsumerGroup;
