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

/**
 * Properties that define an Analytics item that is associated to an
 * Application Insights component.
 *
 */
class ApplicationInsightsComponentAnalyticsItem {
  /**
   * Create a ApplicationInsightsComponentAnalyticsItem.
   * @member {string} [id] Internally assigned unique id of the item
   * definition.
   * @member {string} [name] The user-defined name of the item.
   * @member {string} [content] The content of this item
   * @member {string} [version] This instance's version of the data model. This
   * can change as new features are added.
   * @member {string} [scope] Enum indicating if this item definition is owned
   * by a specific user or is shared between all users with access to the
   * Application Insights component. Possible values include: 'shared', 'user'
   * @member {string} [type] Enum indicating the type of the Analytics item.
   * Possible values include: 'query', 'function', 'folder', 'recent'
   * @member {string} [timeCreated] Date and time in UTC when this item was
   * created.
   * @member {string} [timeModified] Date and time in UTC of the last
   * modification that was made to this item.
   * @member {object} [properties]
   * @member {string} [properties.functionAlias] A function alias, used when
   * the type of the item is Function
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApplicationInsightsComponentAnalyticsItem
   *
   * @returns {object} metadata of ApplicationInsightsComponentAnalyticsItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationInsightsComponentAnalyticsItem',
      type: {
        name: 'Composite',
        className: 'ApplicationInsightsComponentAnalyticsItem',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'Id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'Name',
            type: {
              name: 'String'
            }
          },
          content: {
            required: false,
            serializedName: 'Content',
            type: {
              name: 'String'
            }
          },
          version: {
            required: false,
            readOnly: true,
            serializedName: 'Version',
            type: {
              name: 'String'
            }
          },
          scope: {
            required: false,
            serializedName: 'Scope',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'Type',
            type: {
              name: 'String'
            }
          },
          timeCreated: {
            required: false,
            readOnly: true,
            serializedName: 'TimeCreated',
            type: {
              name: 'String'
            }
          },
          timeModified: {
            required: false,
            readOnly: true,
            serializedName: 'TimeModified',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'Properties',
            type: {
              name: 'Composite',
              className: 'ApplicationInsightsComponentAnalyticsItemProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationInsightsComponentAnalyticsItem;
