<?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;

/**
 * Annotation value for an example.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.AnnotationValue</code>
 */
class AnnotationValue extends \Google\Protobuf\Internal\Message
{
    protected $value_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\ImageClassificationAnnotation $image_classification_annotation
     *           Annotation value for image classification case.
     *     @type \Google\Cloud\DataLabeling\V1beta1\ImageBoundingPolyAnnotation $image_bounding_poly_annotation
     *           Annotation value for image bounding box, oriented bounding box
     *           and polygon cases.
     *     @type \Google\Cloud\DataLabeling\V1beta1\ImagePolylineAnnotation $image_polyline_annotation
     *           Annotation value for image polyline cases.
     *           Polyline here is different from BoundingPoly. It is formed by
     *           line segments connected to each other but not closed form(Bounding Poly).
     *           The line segments can cross each other.
     *     @type \Google\Cloud\DataLabeling\V1beta1\ImageSegmentationAnnotation $image_segmentation_annotation
     *           Annotation value for image segmentation.
     *     @type \Google\Cloud\DataLabeling\V1beta1\TextClassificationAnnotation $text_classification_annotation
     *           Annotation value for text classification case.
     *     @type \Google\Cloud\DataLabeling\V1beta1\TextEntityExtractionAnnotation $text_entity_extraction_annotation
     *           Annotation value for text entity extraction case.
     *     @type \Google\Cloud\DataLabeling\V1beta1\VideoClassificationAnnotation $video_classification_annotation
     *           Annotation value for video classification case.
     *     @type \Google\Cloud\DataLabeling\V1beta1\VideoObjectTrackingAnnotation $video_object_tracking_annotation
     *           Annotation value for video object detection and tracking case.
     *     @type \Google\Cloud\DataLabeling\V1beta1\VideoEventAnnotation $video_event_annotation
     *           Annotation value for video event case.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Annotation::initOnce();
        parent::__construct($data);
    }

    /**
     * Annotation value for image classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ImageClassificationAnnotation|null
     */
    public function getImageClassificationAnnotation()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Annotation value for image classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageClassificationAnnotation image_classification_annotation = 1;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ImageClassificationAnnotation $var
     * @return $this
     */
    public function setImageClassificationAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ImageClassificationAnnotation::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Annotation value for image bounding box, oriented bounding box
     * and polygon cases.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ImageBoundingPolyAnnotation|null
     */
    public function getImageBoundingPolyAnnotation()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Annotation value for image bounding box, oriented bounding box
     * and polygon cases.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageBoundingPolyAnnotation image_bounding_poly_annotation = 2;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ImageBoundingPolyAnnotation $var
     * @return $this
     */
    public function setImageBoundingPolyAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ImageBoundingPolyAnnotation::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Annotation value for image polyline cases.
     * Polyline here is different from BoundingPoly. It is formed by
     * line segments connected to each other but not closed form(Bounding Poly).
     * The line segments can cross each other.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ImagePolylineAnnotation|null
     */
    public function getImagePolylineAnnotation()
    {
        return $this->readOneof(8);
    }

    public function hasImagePolylineAnnotation()
    {
        return $this->hasOneof(8);
    }

    /**
     * Annotation value for image polyline cases.
     * Polyline here is different from BoundingPoly. It is formed by
     * line segments connected to each other but not closed form(Bounding Poly).
     * The line segments can cross each other.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImagePolylineAnnotation image_polyline_annotation = 8;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ImagePolylineAnnotation $var
     * @return $this
     */
    public function setImagePolylineAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ImagePolylineAnnotation::class);
        $this->writeOneof(8, $var);

        return $this;
    }

    /**
     * Annotation value for image segmentation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ImageSegmentationAnnotation|null
     */
    public function getImageSegmentationAnnotation()
    {
        return $this->readOneof(9);
    }

    public function hasImageSegmentationAnnotation()
    {
        return $this->hasOneof(9);
    }

    /**
     * Annotation value for image segmentation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageSegmentationAnnotation image_segmentation_annotation = 9;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ImageSegmentationAnnotation $var
     * @return $this
     */
    public function setImageSegmentationAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ImageSegmentationAnnotation::class);
        $this->writeOneof(9, $var);

        return $this;
    }

    /**
     * Annotation value for text classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\TextClassificationAnnotation|null
     */
    public function getTextClassificationAnnotation()
    {
        return $this->readOneof(3);
    }

    public function hasTextClassificationAnnotation()
    {
        return $this->hasOneof(3);
    }

    /**
     * Annotation value for text classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextClassificationAnnotation text_classification_annotation = 3;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\TextClassificationAnnotation $var
     * @return $this
     */
    public function setTextClassificationAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\TextClassificationAnnotation::class);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Annotation value for text entity extraction case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation text_entity_extraction_annotation = 10;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\TextEntityExtractionAnnotation|null
     */
    public function getTextEntityExtractionAnnotation()
    {
        return $this->readOneof(10);
    }

    public function hasTextEntityExtractionAnnotation()
    {
        return $this->hasOneof(10);
    }

    /**
     * Annotation value for text entity extraction case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.TextEntityExtractionAnnotation text_entity_extraction_annotation = 10;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\TextEntityExtractionAnnotation $var
     * @return $this
     */
    public function setTextEntityExtractionAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\TextEntityExtractionAnnotation::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Annotation value for video classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\VideoClassificationAnnotation|null
     */
    public function getVideoClassificationAnnotation()
    {
        return $this->readOneof(4);
    }

    public function hasVideoClassificationAnnotation()
    {
        return $this->hasOneof(4);
    }

    /**
     * Annotation value for video classification case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoClassificationAnnotation video_classification_annotation = 4;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\VideoClassificationAnnotation $var
     * @return $this
     */
    public function setVideoClassificationAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\VideoClassificationAnnotation::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Annotation value for video object detection and tracking case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\VideoObjectTrackingAnnotation|null
     */
    public function getVideoObjectTrackingAnnotation()
    {
        return $this->readOneof(5);
    }

    public function hasVideoObjectTrackingAnnotation()
    {
        return $this->hasOneof(5);
    }

    /**
     * Annotation value for video object detection and tracking case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoObjectTrackingAnnotation video_object_tracking_annotation = 5;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\VideoObjectTrackingAnnotation $var
     * @return $this
     */
    public function setVideoObjectTrackingAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\VideoObjectTrackingAnnotation::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Annotation value for video event case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\VideoEventAnnotation|null
     */
    public function getVideoEventAnnotation()
    {
        return $this->readOneof(6);
    }

    public function hasVideoEventAnnotation()
    {
        return $this->hasOneof(6);
    }

    /**
     * Annotation value for video event case.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.VideoEventAnnotation video_event_annotation = 6;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\VideoEventAnnotation $var
     * @return $this
     */
    public function setVideoEventAnnotation($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\VideoEventAnnotation::class);
        $this->writeOneof(6, $var);

        return $this;
    }

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

}

