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

namespace Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings;

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

/**
 * Define behaviors for DTMF (dual tone multi frequency).
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.cx.v3.AdvancedSettings.DtmfSettings</code>
 */
class DtmfSettings extends \Google\Protobuf\Internal\Message
{
    /**
     * If true, incoming audio is processed for DTMF (dual tone multi frequency)
     * events. For example, if the caller presses a button on their telephone
     * keypad and DTMF processing is enabled, Dialogflow will detect the
     * event (e.g. a "3" was pressed) in the incoming audio and pass the event
     * to the bot to drive business logic (e.g. when 3 is pressed, return the
     * account balance).
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     */
    protected $enabled = false;
    /**
     * Max length of DTMF digits.
     *
     * Generated from protobuf field <code>int32 max_digits = 2;</code>
     */
    protected $max_digits = 0;
    /**
     * The digit that terminates a DTMF digit sequence.
     *
     * Generated from protobuf field <code>string finish_digit = 3;</code>
     */
    protected $finish_digit = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           If true, incoming audio is processed for DTMF (dual tone multi frequency)
     *           events. For example, if the caller presses a button on their telephone
     *           keypad and DTMF processing is enabled, Dialogflow will detect the
     *           event (e.g. a "3" was pressed) in the incoming audio and pass the event
     *           to the bot to drive business logic (e.g. when 3 is pressed, return the
     *           account balance).
     *     @type int $max_digits
     *           Max length of DTMF digits.
     *     @type string $finish_digit
     *           The digit that terminates a DTMF digit sequence.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\Cx\V3\AdvancedSettings::initOnce();
        parent::__construct($data);
    }

    /**
     * If true, incoming audio is processed for DTMF (dual tone multi frequency)
     * events. For example, if the caller presses a button on their telephone
     * keypad and DTMF processing is enabled, Dialogflow will detect the
     * event (e.g. a "3" was pressed) in the incoming audio and pass the event
     * to the bot to drive business logic (e.g. when 3 is pressed, return the
     * account balance).
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * If true, incoming audio is processed for DTMF (dual tone multi frequency)
     * events. For example, if the caller presses a button on their telephone
     * keypad and DTMF processing is enabled, Dialogflow will detect the
     * event (e.g. a "3" was pressed) in the incoming audio and pass the event
     * to the bot to drive business logic (e.g. when 3 is pressed, return the
     * account balance).
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * Max length of DTMF digits.
     *
     * Generated from protobuf field <code>int32 max_digits = 2;</code>
     * @return int
     */
    public function getMaxDigits()
    {
        return $this->max_digits;
    }

    /**
     * Max length of DTMF digits.
     *
     * Generated from protobuf field <code>int32 max_digits = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setMaxDigits($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_digits = $var;

        return $this;
    }

    /**
     * The digit that terminates a DTMF digit sequence.
     *
     * Generated from protobuf field <code>string finish_digit = 3;</code>
     * @return string
     */
    public function getFinishDigit()
    {
        return $this->finish_digit;
    }

    /**
     * The digit that terminates a DTMF digit sequence.
     *
     * Generated from protobuf field <code>string finish_digit = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setFinishDigit($var)
    {
        GPBUtil::checkString($var, True);
        $this->finish_digit = $var;

        return $this;
    }

}


