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

/**
 * This wraps either Workbook definition or LinkReource properties.
 *
 */
class WorkbookPayload {
  /**
   * Create a WorkbookPayload.
   * @member {object} [workbook] Workbook properties. If provided, it will be
   * used to create new workbook.
   * @member {string} [workbook.kind] The kind of workbook. Choices are user
   * and shared. Possible values include: 'user', 'shared'
   * @member {string} [workbook.workbookName] The user-defined name of the
   * workbook.
   * @member {string} [workbook.serializedData] Configuration of this
   * particular workbook. Configuration data is a string containing valid JSON
   * @member {string} [workbook.version] This instance's version of the data
   * model. This can change as new features are added that can be marked
   * workbook.
   * @member {string} [workbook.workbookId] Internally assigned unique id of
   * the workbook definition.
   * @member {string} [workbook.sharedTypeKind] Enum indicating if this
   * workbook definition is owned by a specific user or is shared between all
   * users with access to the Application Insights component. Possible values
   * include: 'user', 'shared'
   * @member {string} [workbook.timeModified] Date and time in UTC of the last
   * modification that was made to this workbook definition.
   * @member {string} [workbook.category] Workbook category, as defined by the
   * user at creation time.
   * @member {array} [workbook.workbookTags] A list of 0 or more tags that are
   * associated with this workbook definition
   * @member {string} [workbook.userId] Unique user id of the specific user
   * that owns this workbook.
   * @member {string} [workbook.sourceResourceId] Optional resourceId for a
   * source resource.
   * @member {object} [linkResource] LinkProperties. If provided, it will be
   * used to create a link.
   * @member {string} [linkResource.sourceId] The source Azure resource id
   * @member {string} [linkResource.targetId] The workbook Azure resource id
   * @member {string} [linkResource.category] The category of workbook
   */
  constructor() {
  }

  /**
   * Defines the metadata of WorkbookPayload
   *
   * @returns {object} metadata of WorkbookPayload
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WorkbookPayload',
      type: {
        name: 'Composite',
        className: 'WorkbookPayload',
        modelProperties: {
          workbook: {
            required: false,
            serializedName: 'workbook',
            type: {
              name: 'Composite',
              className: 'Workbook'
            }
          },
          linkResource: {
            required: false,
            serializedName: 'linkResource',
            type: {
              name: 'Composite',
              className: 'LinkProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = WorkbookPayload;
