<?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 object tracking annotation.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation</code>
 */
class VideoObjectTrackingAnnotation extends \Google\Protobuf\Internal\Message
{
    /**
     * Label of the object tracked in this annotation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1;</code>
     */
    private $annotation_spec = null;
    /**
     * The time segment of the video to which object tracking applies.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2;</code>
     */
    private $time_segment = null;
    /**
     * The list of frames where this object track appears.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3;</code>
     */
    private $object_tracking_frames;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\AnnotationSpec $annotation_spec
     *           Label of the object tracked in this annotation.
     *     @type \Google\Cloud\DataLabeling\V1beta1\TimeSegment $time_segment
     *           The time segment of the video to which object tracking applies.
     *     @type \Google\Cloud\DataLabeling\V1beta1\ObjectTrackingFrame[]|\Google\Protobuf\Internal\RepeatedField $object_tracking_frames
     *           The list of frames where this object track appears.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Annotation::initOnce();
        parent::__construct($data);
    }

    /**
     * Label of the object tracked in this annotation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\AnnotationSpec|null
     */
    public function getAnnotationSpec()
    {
        return isset($this->annotation_spec) ? $this->annotation_spec : null;
    }

    public function hasAnnotationSpec()
    {
        return isset($this->annotation_spec);
    }

    public function clearAnnotationSpec()
    {
        unset($this->annotation_spec);
    }

    /**
     * Label of the object tracked in this annotation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.AnnotationSpec annotation_spec = 1;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\AnnotationSpec $var
     * @return $this
     */
    public function setAnnotationSpec($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\AnnotationSpec::class);
        $this->annotation_spec = $var;

        return $this;
    }

    /**
     * The time segment of the video to which object tracking applies.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\TimeSegment|null
     */
    public function getTimeSegment()
    {
        return isset($this->time_segment) ? $this->time_segment : null;
    }

    public function hasTimeSegment()
    {
        return isset($this->time_segment);
    }

    public function clearTimeSegment()
    {
        unset($this->time_segment);
    }

    /**
     * The time segment of the video to which object tracking applies.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TimeSegment time_segment = 2;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\TimeSegment $var
     * @return $this
     */
    public function setTimeSegment($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\TimeSegment::class);
        $this->time_segment = $var;

        return $this;
    }

    /**
     * The list of frames where this object track appears.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getObjectTrackingFrames()
    {
        return $this->object_tracking_frames;
    }

    /**
     * The list of frames where this object track appears.
     *
     * Generated from protobuf field <code>repeated .google.cloud.datalabeling.v1beta1.ObjectTrackingFrame object_tracking_frames = 3;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ObjectTrackingFrame[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setObjectTrackingFrames($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\DataLabeling\V1beta1\ObjectTrackingFrame::class);
        $this->object_tracking_frames = $arr;

        return $this;
    }

}

