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

/**
 * A brand detected in an image.
 *
 */
class DetectedBrand {
  /**
   * Create a DetectedBrand.
   * @property {string} [name] Label for the brand.
   * @property {number} [confidence] Confidence score of having observed the
   * brand in the image, as a value ranging from 0 to 1.
   * @property {object} [rectangle] Approximate location of the detected brand.
   * @property {number} [rectangle.x] X-coordinate of the top left point of the
   * area, in pixels.
   * @property {number} [rectangle.y] Y-coordinate of the top left point of the
   * area, in pixels.
   * @property {number} [rectangle.w] Width measured from the top-left point of
   * the area, in pixels.
   * @property {number} [rectangle.h] Height measured from the top-left point
   * of the area, in pixels.
   */
  constructor() {
  }

  /**
   * Defines the metadata of DetectedBrand
   *
   * @returns {object} metadata of DetectedBrand
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DetectedBrand',
      type: {
        name: 'Composite',
        className: 'DetectedBrand',
        modelProperties: {
          name: {
            required: false,
            nullable: true,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          confidence: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'confidence',
            type: {
              name: 'Number'
            }
          },
          rectangle: {
            required: false,
            readOnly: true,
            serializedName: 'rectangle',
            type: {
              name: 'Composite',
              className: 'BoundingRect'
            }
          }
        }
      }
    };
  }
}

module.exports = DetectedBrand;
