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

namespace Google\Cloud\VideoIntelligence\V1beta2;

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

/**
 * Annotation results for a single video.
 *
 * Generated from protobuf message <code>google.cloud.videointelligence.v1beta2.VideoAnnotationResults</code>
 */
class VideoAnnotationResults extends \Google\Protobuf\Internal\Message
{
    /**
     * Video file location in
     * [Google Cloud Storage](https://cloud.google.com/storage/).
     *
     * Generated from protobuf field <code>string input_uri = 1;</code>
     */
    private $input_uri = '';
    /**
     * Label annotations on video level or user specified segment level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation segment_label_annotations = 2;</code>
     */
    private $segment_label_annotations;
    /**
     * Label annotations on shot level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation shot_label_annotations = 3;</code>
     */
    private $shot_label_annotations;
    /**
     * Label annotations on frame level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation frame_label_annotations = 4;</code>
     */
    private $frame_label_annotations;
    /**
     * Face annotations. There is exactly one element for each unique face.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.FaceAnnotation face_annotations = 5;</code>
     */
    private $face_annotations;
    /**
     * Shot annotations. Each shot is represented as a video segment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.VideoSegment shot_annotations = 6;</code>
     */
    private $shot_annotations;
    /**
     * Explicit content annotation.
     *
     * Generated from protobuf field <code>.google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation explicit_annotation = 7;</code>
     */
    private $explicit_annotation = null;
    /**
     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
     * some videos may succeed and some may fail.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 9;</code>
     */
    private $error = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $input_uri
     *           Video file location in
     *           [Google Cloud Storage](https://cloud.google.com/storage/).
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $segment_label_annotations
     *           Label annotations on video level or user specified segment level.
     *           There is exactly one element for each unique label.
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $shot_label_annotations
     *           Label annotations on shot level.
     *           There is exactly one element for each unique label.
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $frame_label_annotations
     *           Label annotations on frame level.
     *           There is exactly one element for each unique label.
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\FaceAnnotation[]|\Google\Protobuf\Internal\RepeatedField $face_annotations
     *           Face annotations. There is exactly one element for each unique face.
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\VideoSegment[]|\Google\Protobuf\Internal\RepeatedField $shot_annotations
     *           Shot annotations. Each shot is represented as a video segment.
     *     @type \Google\Cloud\VideoIntelligence\V1beta2\ExplicitContentAnnotation $explicit_annotation
     *           Explicit content annotation.
     *     @type \Google\Rpc\Status $error
     *           If set, indicates an error. Note that for a single `AnnotateVideoRequest`
     *           some videos may succeed and some may fail.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Videointelligence\V1Beta2\VideoIntelligence::initOnce();
        parent::__construct($data);
    }

    /**
     * Video file location in
     * [Google Cloud Storage](https://cloud.google.com/storage/).
     *
     * Generated from protobuf field <code>string input_uri = 1;</code>
     * @return string
     */
    public function getInputUri()
    {
        return $this->input_uri;
    }

    /**
     * Video file location in
     * [Google Cloud Storage](https://cloud.google.com/storage/).
     *
     * Generated from protobuf field <code>string input_uri = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setInputUri($var)
    {
        GPBUtil::checkString($var, True);
        $this->input_uri = $var;

        return $this;
    }

    /**
     * Label annotations on video level or user specified segment level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation segment_label_annotations = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSegmentLabelAnnotations()
    {
        return $this->segment_label_annotations;
    }

    /**
     * Label annotations on video level or user specified segment level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation segment_label_annotations = 2;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSegmentLabelAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
        $this->segment_label_annotations = $arr;

        return $this;
    }

    /**
     * Label annotations on shot level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation shot_label_annotations = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getShotLabelAnnotations()
    {
        return $this->shot_label_annotations;
    }

    /**
     * Label annotations on shot level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation shot_label_annotations = 3;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setShotLabelAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
        $this->shot_label_annotations = $arr;

        return $this;
    }

    /**
     * Label annotations on frame level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation frame_label_annotations = 4;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFrameLabelAnnotations()
    {
        return $this->frame_label_annotations;
    }

    /**
     * Label annotations on frame level.
     * There is exactly one element for each unique label.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.LabelAnnotation frame_label_annotations = 4;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFrameLabelAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\LabelAnnotation::class);
        $this->frame_label_annotations = $arr;

        return $this;
    }

    /**
     * Face annotations. There is exactly one element for each unique face.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.FaceAnnotation face_annotations = 5;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFaceAnnotations()
    {
        return $this->face_annotations;
    }

    /**
     * Face annotations. There is exactly one element for each unique face.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.FaceAnnotation face_annotations = 5;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\FaceAnnotation[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFaceAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\FaceAnnotation::class);
        $this->face_annotations = $arr;

        return $this;
    }

    /**
     * Shot annotations. Each shot is represented as a video segment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.VideoSegment shot_annotations = 6;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getShotAnnotations()
    {
        return $this->shot_annotations;
    }

    /**
     * Shot annotations. Each shot is represented as a video segment.
     *
     * Generated from protobuf field <code>repeated .google.cloud.videointelligence.v1beta2.VideoSegment shot_annotations = 6;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\VideoSegment[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setShotAnnotations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VideoIntelligence\V1beta2\VideoSegment::class);
        $this->shot_annotations = $arr;

        return $this;
    }

    /**
     * Explicit content annotation.
     *
     * Generated from protobuf field <code>.google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation explicit_annotation = 7;</code>
     * @return \Google\Cloud\VideoIntelligence\V1beta2\ExplicitContentAnnotation|null
     */
    public function getExplicitAnnotation()
    {
        return isset($this->explicit_annotation) ? $this->explicit_annotation : null;
    }

    public function hasExplicitAnnotation()
    {
        return isset($this->explicit_annotation);
    }

    public function clearExplicitAnnotation()
    {
        unset($this->explicit_annotation);
    }

    /**
     * Explicit content annotation.
     *
     * Generated from protobuf field <code>.google.cloud.videointelligence.v1beta2.ExplicitContentAnnotation explicit_annotation = 7;</code>
     * @param \Google\Cloud\VideoIntelligence\V1beta2\ExplicitContentAnnotation $var
     * @return $this
     */
    public function setExplicitAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\VideoIntelligence\V1beta2\ExplicitContentAnnotation::class);
        $this->explicit_annotation = $var;

        return $this;
    }

    /**
     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
     * some videos may succeed and some may fail.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 9;</code>
     * @return \Google\Rpc\Status|null
     */
    public function getError()
    {
        return isset($this->error) ? $this->error : null;
    }

    public function hasError()
    {
        return isset($this->error);
    }

    public function clearError()
    {
        unset($this->error);
    }

    /**
     * If set, indicates an error. Note that for a single `AnnotateVideoRequest`
     * some videos may succeed and some may fail.
     *
     * Generated from protobuf field <code>.google.rpc.Status error = 9;</code>
     * @param \Google\Rpc\Status $var
     * @return $this
     */
    public function setError($var)
    {
        GPBUtil::checkMessage($var, \Google\Rpc\Status::class);
        $this->error = $var;

        return $this;
    }

}

