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

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * Request message for starting an image labeling task.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.LabelImageRequest</code>
 */
class LabelImageRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. Name of the dataset to request labeling task, format:
     * projects/{project_id}/datasets/{dataset_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. Basic human annotation config.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $basic_config = null;
    /**
     * Required. The type of image labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $feature = 0;
    protected $request_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\ImageClassificationConfig $image_classification_config
     *           Configuration for image classification task.
     *           One of image_classification_config, bounding_poly_config,
     *           polyline_config and segmentation_config are required.
     *     @type \Google\Cloud\DataLabeling\V1beta1\BoundingPolyConfig $bounding_poly_config
     *           Configuration for bounding box and bounding poly task.
     *           One of image_classification_config, bounding_poly_config,
     *           polyline_config and segmentation_config are required.
     *     @type \Google\Cloud\DataLabeling\V1beta1\PolylineConfig $polyline_config
     *           Configuration for polyline task.
     *           One of image_classification_config, bounding_poly_config,
     *           polyline_config and segmentation_config are required.
     *     @type \Google\Cloud\DataLabeling\V1beta1\SegmentationConfig $segmentation_config
     *           Configuration for segmentation task.
     *           One of image_classification_config, bounding_poly_config,
     *           polyline_config and segmentation_config are required.
     *     @type string $parent
     *           Required. Name of the dataset to request labeling task, format:
     *           projects/{project_id}/datasets/{dataset_id}
     *     @type \Google\Cloud\DataLabeling\V1beta1\HumanAnnotationConfig $basic_config
     *           Required. Basic human annotation config.
     *     @type int $feature
     *           Required. The type of image labeling task.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\DataLabelingService::initOnce();
        parent::__construct($data);
    }

    /**
     * Configuration for image classification task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\ImageClassificationConfig|null
     */
    public function getImageClassificationConfig()
    {
        return $this->readOneof(4);
    }

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

    /**
     * Configuration for image classification task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.ImageClassificationConfig image_classification_config = 4;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\ImageClassificationConfig $var
     * @return $this
     */
    public function setImageClassificationConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\ImageClassificationConfig::class);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Configuration for bounding box and bounding poly task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\BoundingPolyConfig|null
     */
    public function getBoundingPolyConfig()
    {
        return $this->readOneof(5);
    }

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

    /**
     * Configuration for bounding box and bounding poly task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.BoundingPolyConfig bounding_poly_config = 5;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\BoundingPolyConfig $var
     * @return $this
     */
    public function setBoundingPolyConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\BoundingPolyConfig::class);
        $this->writeOneof(5, $var);

        return $this;
    }

    /**
     * Configuration for polyline task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\PolylineConfig|null
     */
    public function getPolylineConfig()
    {
        return $this->readOneof(6);
    }

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

    /**
     * Configuration for polyline task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.PolylineConfig polyline_config = 6;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\PolylineConfig $var
     * @return $this
     */
    public function setPolylineConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\PolylineConfig::class);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * Configuration for segmentation task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\SegmentationConfig|null
     */
    public function getSegmentationConfig()
    {
        return $this->readOneof(7);
    }

    public function hasSegmentationConfig()
    {
        return $this->hasOneof(7);
    }

    /**
     * Configuration for segmentation task.
     * One of image_classification_config, bounding_poly_config,
     * polyline_config and segmentation_config are required.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.SegmentationConfig segmentation_config = 7;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\SegmentationConfig $var
     * @return $this
     */
    public function setSegmentationConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\SegmentationConfig::class);
        $this->writeOneof(7, $var);

        return $this;
    }

    /**
     * Required. Name of the dataset to request labeling task, format:
     * projects/{project_id}/datasets/{dataset_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. Name of the dataset to request labeling task, format:
     * projects/{project_id}/datasets/{dataset_id}
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. Basic human annotation config.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\HumanAnnotationConfig|null
     */
    public function getBasicConfig()
    {
        return $this->basic_config;
    }

    public function hasBasicConfig()
    {
        return isset($this->basic_config);
    }

    public function clearBasicConfig()
    {
        unset($this->basic_config);
    }

    /**
     * Required. Basic human annotation config.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.HumanAnnotationConfig basic_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\HumanAnnotationConfig $var
     * @return $this
     */
    public function setBasicConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\HumanAnnotationConfig::class);
        $this->basic_config = $var;

        return $this;
    }

    /**
     * Required. The type of image labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getFeature()
    {
        return $this->feature;
    }

    /**
     * Required. The type of image labeling task.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.LabelImageRequest.Feature feature = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setFeature($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\DataLabeling\V1beta1\LabelImageRequest\Feature::class);
        $this->feature = $var;

        return $this;
    }

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

}

