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

namespace Google\Cloud\DocumentAI\V1\Document\Page;

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

/**
 * Dimension for the page.
 *
 * Generated from protobuf message <code>google.cloud.documentai.v1.Document.Page.Dimension</code>
 */
class Dimension extends \Google\Protobuf\Internal\Message
{
    /**
     * Page width.
     *
     * Generated from protobuf field <code>float width = 1;</code>
     */
    private $width = 0.0;
    /**
     * Page height.
     *
     * Generated from protobuf field <code>float height = 2;</code>
     */
    private $height = 0.0;
    /**
     * Dimension unit.
     *
     * Generated from protobuf field <code>string unit = 3;</code>
     */
    private $unit = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type float $width
     *           Page width.
     *     @type float $height
     *           Page height.
     *     @type string $unit
     *           Dimension unit.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Documentai\V1\Document::initOnce();
        parent::__construct($data);
    }

    /**
     * Page width.
     *
     * Generated from protobuf field <code>float width = 1;</code>
     * @return float
     */
    public function getWidth()
    {
        return $this->width;
    }

    /**
     * Page width.
     *
     * Generated from protobuf field <code>float width = 1;</code>
     * @param float $var
     * @return $this
     */
    public function setWidth($var)
    {
        GPBUtil::checkFloat($var);
        $this->width = $var;

        return $this;
    }

    /**
     * Page height.
     *
     * Generated from protobuf field <code>float height = 2;</code>
     * @return float
     */
    public function getHeight()
    {
        return $this->height;
    }

    /**
     * Page height.
     *
     * Generated from protobuf field <code>float height = 2;</code>
     * @param float $var
     * @return $this
     */
    public function setHeight($var)
    {
        GPBUtil::checkFloat($var);
        $this->height = $var;

        return $this;
    }

    /**
     * Dimension unit.
     *
     * Generated from protobuf field <code>string unit = 3;</code>
     * @return string
     */
    public function getUnit()
    {
        return $this->unit;
    }

    /**
     * Dimension unit.
     *
     * Generated from protobuf field <code>string unit = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setUnit($var)
    {
        GPBUtil::checkString($var, True);
        $this->unit = $var;

        return $this;
    }

}


