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

namespace Google\Cloud\DataLabeling\V1beta1;

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

/**
 * The configuration of output data.
 *
 * Generated from protobuf message <code>google.cloud.datalabeling.v1beta1.OutputConfig</code>
 */
class OutputConfig extends \Google\Protobuf\Internal\Message
{
    protected $destination;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\DataLabeling\V1beta1\GcsDestination $gcs_destination
     *           Output to a file in Cloud Storage. Should be used for labeling output
     *           other than image segmentation.
     *     @type \Google\Cloud\DataLabeling\V1beta1\GcsFolderDestination $gcs_folder_destination
     *           Output to a folder in Cloud Storage. Should be used for image
     *           segmentation labeling output.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Datalabeling\V1Beta1\Dataset::initOnce();
        parent::__construct($data);
    }

    /**
     * Output to a file in Cloud Storage. Should be used for labeling output
     * other than image segmentation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\GcsDestination|null
     */
    public function getGcsDestination()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Output to a file in Cloud Storage. Should be used for labeling output
     * other than image segmentation.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsDestination gcs_destination = 1;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\GcsDestination $var
     * @return $this
     */
    public function setGcsDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\GcsDestination::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Output to a folder in Cloud Storage. Should be used for image
     * segmentation labeling output.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2;</code>
     * @return \Google\Cloud\DataLabeling\V1beta1\GcsFolderDestination|null
     */
    public function getGcsFolderDestination()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Output to a folder in Cloud Storage. Should be used for image
     * segmentation labeling output.
     *
     * Generated from protobuf field <code>.google.cloud.datalabeling.v1beta1.GcsFolderDestination gcs_folder_destination = 2;</code>
     * @param \Google\Cloud\DataLabeling\V1beta1\GcsFolderDestination $var
     * @return $this
     */
    public function setGcsFolderDestination($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\DataLabeling\V1beta1\GcsFolderDestination::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

