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

namespace Google\Cloud\Ces\V1\TriggerAction;

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

/**
 * The agent will immediately respond with a preconfigured response.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.TriggerAction.RespondImmediately</code>
 */
class RespondImmediately extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The canned responses for the agent to choose from. The response
     * is chosen randomly.
     *
     * Generated from protobuf field <code>repeated .google.cloud.ces.v1.TriggerAction.Response responses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $responses;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Ces\V1\TriggerAction\Response[] $responses
     *           Required. The canned responses for the agent to choose from. The response
     *           is chosen randomly.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\Common::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The canned responses for the agent to choose from. The response
     * is chosen randomly.
     *
     * Generated from protobuf field <code>repeated .google.cloud.ces.v1.TriggerAction.Response responses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return RepeatedField<\Google\Cloud\Ces\V1\TriggerAction\Response>
     */
    public function getResponses()
    {
        return $this->responses;
    }

    /**
     * Required. The canned responses for the agent to choose from. The response
     * is chosen randomly.
     *
     * Generated from protobuf field <code>repeated .google.cloud.ces.v1.TriggerAction.Response responses = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Ces\V1\TriggerAction\Response[] $var
     * @return $this
     */
    public function setResponses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Ces\V1\TriggerAction\Response::class);
        $this->responses = $arr;

        return $this;
    }

}

