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

namespace Google\Cloud\ContactCenterInsights\V1;

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

/**
 * The conversation source, which is a combination of transcript and audio.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.ConversationDataSource</code>
 */
class ConversationDataSource extends \Google\Protobuf\Internal\Message
{
    protected $source;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ContactCenterInsights\V1\GcsSource $gcs_source
     *           A Cloud Storage location specification for the audio and transcript.
     *     @type \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $dialogflow_source
     *           The source when the conversation comes from Dialogflow.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * A Cloud Storage location specification for the audio and transcript.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\GcsSource|null
     */
    public function getGcsSource()
    {
        return $this->readOneof(1);
    }

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

    /**
     * A Cloud Storage location specification for the audio and transcript.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.GcsSource gcs_source = 1;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\GcsSource $var
     * @return $this
     */
    public function setGcsSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\GcsSource::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The source when the conversation comes from Dialogflow.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3;</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\DialogflowSource|null
     */
    public function getDialogflowSource()
    {
        return $this->readOneof(3);
    }

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

    /**
     * The source when the conversation comes from Dialogflow.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.DialogflowSource dialogflow_source = 3;</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\DialogflowSource $var
     * @return $this
     */
    public function setDialogflowSource($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\DialogflowSource::class);
        $this->writeOneof(3, $var);

        return $this;
    }

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

}

