<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/vision/v1/image_annotator.proto

namespace Google\Cloud\Vision\V1;

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

/**
 * If an image was produced from a file (e.g. a PDF), this message gives
 * information about the source of that image.
 *
 * Generated from protobuf message <code>google.cloud.vision.v1.ImageAnnotationContext</code>
 */
class ImageAnnotationContext extends \Google\Protobuf\Internal\Message
{
    /**
     * The URI of the file used to produce the image.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     */
    private $uri = '';
    /**
     * If the file was a PDF or TIFF, this field gives the page number within
     * the file used to produce the image.
     *
     * Generated from protobuf field <code>int32 page_number = 2;</code>
     */
    private $page_number = 0;

    public function __construct() {
        \GPBMetadata\Google\Cloud\Vision\V1\ImageAnnotator::initOnce();
        parent::__construct();
    }

    /**
     * The URI of the file used to produce the image.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @return string
     */
    public function getUri()
    {
        return $this->uri;
    }

    /**
     * The URI of the file used to produce the image.
     *
     * Generated from protobuf field <code>string uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->uri = $var;

        return $this;
    }

    /**
     * If the file was a PDF or TIFF, this field gives the page number within
     * the file used to produce the image.
     *
     * Generated from protobuf field <code>int32 page_number = 2;</code>
     * @return int
     */
    public function getPageNumber()
    {
        return $this->page_number;
    }

    /**
     * If the file was a PDF or TIFF, this field gives the page number within
     * the file used to produce the image.
     *
     * Generated from protobuf field <code>int32 page_number = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setPageNumber($var)
    {
        GPBUtil::checkInt32($var);
        $this->page_number = $var;

        return $this;
    }

}

