<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/datalabeling/v1beta1/annotation.proto

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Video frame level annotation for object detection and tracking.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.ObjectTrackingFrame</code>
 */
class ObjectTrackingFrame extends \Google\Protobuf\Internal\Message
{
    /**
     * The time offset of this frame relative to the beginning of the video.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 3;</code>
     */
    private $time_offset = null;
    protected $bounded_area;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\BoundingPoly $bounding_poly
     *     @type \Google\Cloud\DataLabeling\V1beta1\NormalizedBoundingPoly $normalized_bounding_poly
     *     @type \Google\Protobuf\Duration $time_offset
     *           The time offset of this frame relative to the beginning of the video.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Annotation::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\BoundingPoly|null
     */
    public function getBoundingPoly()
    {
        return $this->readOneof(1);
    }

    public function hasBoundingPoly()
    {
        return $this->hasOneof(1);
    }

    /**
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BoundingPoly bounding_poly = 1;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\BoundingPoly $var
     * @return $this
     */
    public function setBoundingPoly($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\BoundingPoly::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\NormalizedBoundingPoly|null
     */
    public function getNormalizedBoundingPoly()
    {
        return $this->readOneof(2);
    }

    public function hasNormalizedBoundingPoly()
    {
        return $this->hasOneof(2);
    }

    /**
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.NormalizedBoundingPoly normalized_bounding_poly = 2;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\NormalizedBoundingPoly $var
     * @return $this
     */
    public function setNormalizedBoundingPoly($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\NormalizedBoundingPoly::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The time offset of this frame relative to the beginning of the video.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 3;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getTimeOffset()
    {
        return $this->time_offset;
    }

    public function hasTimeOffset()
    {
        return isset($this->time_offset);
    }

    public function clearTimeOffset()
    {
        unset($this->time_offset);
    }

    /**
     * The time offset of this frame relative to the beginning of the video.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 3;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setTimeOffset($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->time_offset = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getBoundedArea()
    {
        return $this->whichOneof("bounded_area");
    }

}

