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

namespace Google\Cloud\VideoIntelligence\V1;

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

/**
 * Video frame level annotation results for face detection.
 *
 * Generated from protobuf message <code>google.cloud.videointelligence.v1.FaceFrame</code>
 */
class FaceFrame extends \Google\Protobuf\Internal\Message
{
    /**
     * Normalized Bounding boxes in a frame.
     * There can be more than one boxes if the same face is detected in multiple
     * locations within the current frame.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1;</code>
     */
    private $normalized_bounding_boxes;
    /**
     * Time-offset, relative to the beginning of the video,
     * corresponding to the video frame for this location.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 2;</code>
     */
    private $time_offset = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox[]|\Google\Protobuf\Internal\RepeatedField $normalized_bounding_boxes
     *           Normalized Bounding boxes in a frame.
     *           There can be more than one boxes if the same face is detected in multiple
     *           locations within the current frame.
     *     @type \Google\Protobuf\Duration $time_offset
     *           Time-offset, relative to the beginning of the video,
     *           corresponding to the video frame for this location.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Videointelligence\V1\VideoIntelligence::initOnce();
        parent::__construct($data);
    }

    /**
     * Normalized Bounding boxes in a frame.
     * There can be more than one boxes if the same face is detected in multiple
     * locations within the current frame.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNormalizedBoundingBoxes()
    {
        return $this->normalized_bounding_boxes;
    }

    /**
     * Normalized Bounding boxes in a frame.
     * There can be more than one boxes if the same face is detected in multiple
     * locations within the current frame.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1.NormalizedBoundingBox normalized_bounding_boxes = 1;</code>
     * @param \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNormalizedBoundingBoxes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1\NormalizedBoundingBox::class);
        $this->normalized_bounding_boxes = $arr;

        return $this;
    }

    /**
     * Time-offset, relative to the beginning of the video,
     * corresponding to the video frame for this location.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 2;</code>
     * @return \Google\Protobuf\Duration
     */
    public function getTimeOffset()
    {
        return $this->time_offset;
    }

    /**
     * Time-offset, relative to the beginning of the video,
     * corresponding to the video frame for this location.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration time_offset = 2;</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;
    }

}

