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

/**
 * A visual search tag.
 *
 * @extends models['Thing']
 */
class ImageTag extends models['Thing'] {
  /**
   * Create a ImageTag.
   * @property {string} [displayName] Display name for this tag. For the
   * default tag, the display name is empty.
   * @property {object} [boundingBox] The bounding box for this tag. For the
   * default tag, there is no bounding box.
   * @property {object} [boundingBox.queryRectangle] A rectangle that outlines
   * the area of interest for this tag.
   * @property {object} [boundingBox.queryRectangle.topLeft] The top left
   * corner coordinate.
   * @property {number} [boundingBox.queryRectangle.topLeft.x] The x-coordinate
   * of the point.
   * @property {number} [boundingBox.queryRectangle.topLeft.y] The y-coordinate
   * of the point.
   * @property {object} [boundingBox.queryRectangle.topRight] The top right
   * corner coordinate.
   * @property {number} [boundingBox.queryRectangle.topRight.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.queryRectangle.topRight.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.queryRectangle.bottomRight] The bottom
   * right corner coordinate.
   * @property {number} [boundingBox.queryRectangle.bottomRight.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.queryRectangle.bottomRight.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.queryRectangle.bottomLeft] The bottom left
   * corner coordinate.
   * @property {number} [boundingBox.queryRectangle.bottomLeft.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.queryRectangle.bottomLeft.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.displayRectangle] A recommended rectangle
   * to show to the user.
   * @property {object} [boundingBox.displayRectangle.topLeft] The top left
   * corner coordinate.
   * @property {number} [boundingBox.displayRectangle.topLeft.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.displayRectangle.topLeft.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.displayRectangle.topRight] The top right
   * corner coordinate.
   * @property {number} [boundingBox.displayRectangle.topRight.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.displayRectangle.topRight.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.displayRectangle.bottomRight] The bottom
   * right corner coordinate.
   * @property {number} [boundingBox.displayRectangle.bottomRight.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.displayRectangle.bottomRight.y] The
   * y-coordinate of the point.
   * @property {object} [boundingBox.displayRectangle.bottomLeft] The bottom
   * left corner coordinate.
   * @property {number} [boundingBox.displayRectangle.bottomLeft.x] The
   * x-coordinate of the point.
   * @property {number} [boundingBox.displayRectangle.bottomLeft.y] The
   * y-coordinate of the point.
   * @property {array} [actions] Actions within this tag. The order of the
   * items denotes the default ranking order of these actions, with the first
   * action being the most likely user intent.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ImageTag
   *
   * @returns {object} metadata of ImageTag
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ImageTag',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: '_type',
          clientName: '_type'
        },
        uberParent: 'ResponseBase',
        className: 'ImageTag',
        modelProperties: {
          _type: {
            required: true,
            serializedName: '_type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          readLink: {
            required: false,
            readOnly: true,
            serializedName: 'readLink',
            type: {
              name: 'String'
            }
          },
          webSearchUrl: {
            required: false,
            readOnly: true,
            serializedName: 'webSearchUrl',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          url: {
            required: false,
            readOnly: true,
            serializedName: 'url',
            type: {
              name: 'String'
            }
          },
          image: {
            required: false,
            readOnly: true,
            serializedName: 'image',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: '_type',
                clientName: '_type'
              },
              uberParent: 'ResponseBase',
              className: 'ImageObject'
            }
          },
          description: {
            required: false,
            readOnly: true,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          alternateName: {
            required: false,
            readOnly: true,
            serializedName: 'alternateName',
            type: {
              name: 'String'
            }
          },
          bingId: {
            required: false,
            readOnly: true,
            serializedName: 'bingId',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            readOnly: true,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          boundingBox: {
            required: false,
            readOnly: true,
            serializedName: 'boundingBox',
            type: {
              name: 'Composite',
              className: 'ImageTagRegion'
            }
          },
          actions: {
            required: false,
            readOnly: true,
            serializedName: 'actions',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ImageActionElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: '_type',
                      clientName: '_type'
                    },
                    uberParent: 'ResponseBase',
                    className: 'ImageAction'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ImageTag;
