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

/**
 * Defines the category of trending images.
 *
 */
class TrendingImagesCategory {
  /**
   * Create a TrendingImagesCategory.
   * @property {string} title The name of the image category. For example,
   * Popular People Searches.
   * @property {array} tiles A list of images that are trending in the
   * category. Each tile contains an image and a URL that returns more images
   * of the subject. For example, if the category is Popular People Searches,
   * the image is of a popular person and the URL would return more images of
   * that person.
   */
  constructor() {
  }

  /**
   * Defines the metadata of TrendingImagesCategory
   *
   * @returns {object} metadata of TrendingImagesCategory
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TrendingImages/Category',
      type: {
        name: 'Composite',
        className: 'TrendingImagesCategory',
        modelProperties: {
          title: {
            required: true,
            serializedName: 'title',
            type: {
              name: 'String'
            }
          },
          tiles: {
            required: true,
            serializedName: 'tiles',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'TrendingImagesTileElementType',
                  type: {
                    name: 'Composite',
                    className: 'TrendingImagesTile'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TrendingImagesCategory;
