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

/**
 * Tag details.
 *
 */
class TagDetails {
  /**
   * Create a TagDetails.
   * @property {string} [id] The tag ID.
   * @property {string} [tagName] The tag name.
   * @property {object} [count] The total number of resources that use the
   * resource tag. When a tag is initially created and has no associated
   * resources, the value is 0.
   * @property {string} [count.type] Type of count.
   * @property {number} [count.value] Value of count.
   * @property {array} [values] The list of tag values.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TagDetails
   *
   * @returns {object} metadata of TagDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TagDetails',
      type: {
        name: 'Composite',
        className: 'TagDetails',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          tagName: {
            required: false,
            serializedName: 'tagName',
            type: {
              name: 'String'
            }
          },
          count: {
            required: false,
            serializedName: 'count',
            type: {
              name: 'Composite',
              className: 'TagCount'
            }
          },
          values: {
            required: false,
            serializedName: 'values',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TagValueElementType',
                  type: {
                    name: 'Composite',
                    className: 'TagValue'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TagDetails;
