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

namespace Google\Cloud\Ces\V1;

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

/**
 * The top-level message sent by the client for the
 * [SessionService.BidiRunSession][google.cloud.ces.v1.SessionService.BidiRunSession]
 * method.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.BidiSessionClientMessage</code>
 */
class BidiSessionClientMessage extends \Google\Protobuf\Internal\Message
{
    protected $message_type;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Ces\V1\SessionConfig $config
     *           Optional. The initial config message for the session.
     *     @type \Google\Cloud\Ces\V1\SessionInput $realtime_input
     *           Optional. Realtime input for the session.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\SessionService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The initial config message for the session.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SessionConfig config = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\SessionConfig|null
     */
    public function getConfig()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Optional. The initial config message for the session.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SessionConfig config = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\SessionConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\SessionConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Optional. Realtime input for the session.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SessionInput realtime_input = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\Ces\V1\SessionInput|null
     */
    public function getRealtimeInput()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Optional. Realtime input for the session.
     *
     * Generated from protobuf field <code>.google.cloud.ces.v1.SessionInput realtime_input = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\Ces\V1\SessionInput $var
     * @return $this
     */
    public function setRealtimeInput($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Ces\V1\SessionInput::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

