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

/**
 * Class representing a VideoDetails.
 * @extends models['Response']
 */
class VideoDetails extends models['Response'] {
  /**
   * Create a VideoDetails.
   * @property {object} [relatedVideos]
   * @property {array} [relatedVideos.value]
   * @property {object} [videoResult]
   * @property {string} [videoResult.motionThumbnailUrl]
   * @property {string} [videoResult.motionThumbnailId]
   * @property {string} [videoResult.embedHtml]
   * @property {boolean} [videoResult.allowHttpsEmbed]
   * @property {number} [videoResult.viewCount]
   * @property {object} [videoResult.thumbnail]
   * @property {object} [videoResult.thumbnail.thumbnail] The URL to a
   * thumbnail of the image
   * @property {string} [videoResult.videoId]
   * @property {boolean} [videoResult.allowMobileEmbed]
   * @property {boolean} [videoResult.isSuperfresh]
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of VideoDetails
   *
   * @returns {object} metadata of VideoDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'VideoDetails',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: '_type',
          clientName: '_type'
        },
        uberParent: 'ResponseBase',
        className: 'VideoDetails',
        modelProperties: {
          _type: {
            required: true,
            serializedName: '_type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          webSearchUrl: {
            required: false,
            readOnly: true,
            serializedName: 'webSearchUrl',
            type: {
              name: 'String'
            }
          },
          relatedVideos: {
            required: false,
            readOnly: true,
            serializedName: 'relatedVideos',
            type: {
              name: 'Composite',
              className: 'VideosModule'
            }
          },
          videoResult: {
            required: false,
            readOnly: true,
            serializedName: 'videoResult',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: '_type',
                clientName: '_type'
              },
              uberParent: 'ResponseBase',
              className: 'VideoObject'
            }
          }
        }
      }
    };
  }
}

module.exports = VideoDetails;
