<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/conversation_profile.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Defines the hand off to a live agent, typically on which external agent
 * service provider to connect to a conversation.
 * Currently, this feature is not general available, please contact Google
 * to get access.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.HumanAgentHandoffConfig</code>
 */
class HumanAgentHandoffConfig extends \Google\Protobuf\Internal\Message
{
    protected $agent_service;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $live_person_config
     *           Uses LivePerson (https://www.liveperson.com).
     *     @type \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $salesforce_live_agent_config
     *           Uses Salesforce Live Agent.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\ConversationProfile::initOnce();
        parent::__construct($data);
    }

    /**
     * Uses LivePerson (https://www.liveperson.com).
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1;</code>
     * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig|null
     */
    public function getLivePersonConfig()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Uses LivePerson (https://www.liveperson.com).
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.LivePersonConfig live_person_config = 1;</code>
     * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig $var
     * @return $this
     */
    public function setLivePersonConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\LivePersonConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Uses Salesforce Live Agent.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2;</code>
     * @return \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig|null
     */
    public function getSalesforceLiveAgentConfig()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Uses Salesforce Live Agent.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.HumanAgentHandoffConfig.SalesforceLiveAgentConfig salesforce_live_agent_config = 2;</code>
     * @param \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig $var
     * @return $this
     */
    public function setSalesforceLiveAgentConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\HumanAgentHandoffConfig\SalesforceLiveAgentConfig::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

