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

/**
 * The WidgetTypeResourceFormat
 *
 * @extends models['ProxyResource']
 */
class WidgetTypeResourceFormat extends models['ProxyResource'] {
  /**
   * Create a WidgetTypeResourceFormat.
   * @member {string} [widgetTypeName] Name of the widget type.
   * @member {string} definition Definition for widget type.
   * @member {string} [description] Description for widget type.
   * @member {object} [displayName] Localized display name for the widget type.
   * @member {string} [imageUrl] The image URL.
   * @member {string} [tenantId] The hub name.
   * @member {string} [widgetVersion] The widget version.
   * @member {date} [changed] Date time when widget type was last modified.
   * @member {date} [created] Date time when widget type was created.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of WidgetTypeResourceFormat
   *
   * @returns {object} metadata of WidgetTypeResourceFormat
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'WidgetTypeResourceFormat',
      type: {
        name: 'Composite',
        className: 'WidgetTypeResourceFormat',
        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'
            }
          },
          widgetTypeName: {
            required: false,
            readOnly: true,
            serializedName: 'properties.widgetTypeName',
            type: {
              name: 'String'
            }
          },
          definition: {
            required: true,
            serializedName: 'properties.definition',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          imageUrl: {
            required: false,
            serializedName: 'properties.imageUrl',
            type: {
              name: 'String'
            }
          },
          tenantId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.tenantId',
            type: {
              name: 'String'
            }
          },
          widgetVersion: {
            required: false,
            serializedName: 'properties.widgetVersion',
            type: {
              name: 'String'
            }
          },
          changed: {
            required: false,
            readOnly: true,
            serializedName: 'properties.changed',
            type: {
              name: 'DateTime'
            }
          },
          created: {
            required: false,
            readOnly: true,
            serializedName: 'properties.created',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = WidgetTypeResourceFormat;
