<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2/dlp.proto

namespace Google\Cloud\Dlp\V2;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Bounding box encompassing detected text within an image.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2.BoundingBox</code>
 */
class BoundingBox extends \Google\Protobuf\Internal\Message
{
    /**
     * Top coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 top = 1;</code>
     */
    private $top = 0;
    /**
     * Left coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 left = 2;</code>
     */
    private $left = 0;
    /**
     * Width of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 width = 3;</code>
     */
    private $width = 0;
    /**
     * Height of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 height = 4;</code>
     */
    private $height = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $top
     *           Top coordinate of the bounding box. (0,0) is upper left.
     *     @type int $left
     *           Left coordinate of the bounding box. (0,0) is upper left.
     *     @type int $width
     *           Width of the bounding box in pixels.
     *     @type int $height
     *           Height of the bounding box in pixels.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Privacy\Dlp\V2\Dlp::initOnce();
        parent::__construct($data);
    }

    /**
     * Top coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 top = 1;</code>
     * @return int
     */
    public function getTop()
    {
        return $this->top;
    }

    /**
     * Top coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 top = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setTop($var)
    {
        GPBUtil::checkInt32($var);
        $this->top = $var;

        return $this;
    }

    /**
     * Left coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 left = 2;</code>
     * @return int
     */
    public function getLeft()
    {
        return $this->left;
    }

    /**
     * Left coordinate of the bounding box. (0,0) is upper left.
     *
     * Generated from protobuf field <code>int32 left = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setLeft($var)
    {
        GPBUtil::checkInt32($var);
        $this->left = $var;

        return $this;
    }

    /**
     * Width of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 width = 3;</code>
     * @return int
     */
    public function getWidth()
    {
        return $this->width;
    }

    /**
     * Width of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 width = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setWidth($var)
    {
        GPBUtil::checkInt32($var);
        $this->width = $var;

        return $this;
    }

    /**
     * Height of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 height = 4;</code>
     * @return int
     */
    public function getHeight()
    {
        return $this->height;
    }

    /**
     * Height of the bounding box in pixels.
     *
     * Generated from protobuf field <code>int32 height = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setHeight($var)
    {
        GPBUtil::checkInt32($var);
        $this->height = $var;

        return $this;
    }

}

