<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: livekit_connector_whatsapp.proto

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.DisconnectWhatsAppCallRequest</code>
 */
class DisconnectWhatsAppCallRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required - Call ID sent by Meta
     *
     * Generated from protobuf field <code>string whatsapp_call_id = 1 [(.logger.name) = "whatsappCallID"];</code>
     */
    protected $whatsapp_call_id = '';
    /**
     * The API key of the whatsapp business.
     * Required if the DisconnectReason is BUSINESS_INITIATED.
     * Optional for  USER_INITIATED as no API call to WhatsApp is needed.
     *
     * Generated from protobuf field <code>string whatsapp_api_key = 2 [(.logger.redact) = true];</code>
     */
    protected $whatsapp_api_key = '';
    /**
     * The reason for disconnecting the call
     *
     * Generated from protobuf field <code>.livekit.DisconnectWhatsAppCallRequest.DisconnectReason disconnect_reason = 3;</code>
     */
    protected $disconnect_reason = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $whatsapp_call_id
     *           Required - Call ID sent by Meta
     *     @type string $whatsapp_api_key
     *           The API key of the whatsapp business.
     *           Required if the DisconnectReason is BUSINESS_INITIATED.
     *           Optional for  USER_INITIATED as no API call to WhatsApp is needed.
     *     @type int $disconnect_reason
     *           The reason for disconnecting the call
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitConnectorWhatsapp::initOnce();
        parent::__construct($data);
    }

    /**
     * Required - Call ID sent by Meta
     *
     * Generated from protobuf field <code>string whatsapp_call_id = 1 [(.logger.name) = "whatsappCallID"];</code>
     * @return string
     */
    public function getWhatsappCallId()
    {
        return $this->whatsapp_call_id;
    }

    /**
     * Required - Call ID sent by Meta
     *
     * Generated from protobuf field <code>string whatsapp_call_id = 1 [(.logger.name) = "whatsappCallID"];</code>
     * @param string $var
     * @return $this
     */
    public function setWhatsappCallId($var)
    {
        GPBUtil::checkString($var, True);
        $this->whatsapp_call_id = $var;

        return $this;
    }

    /**
     * The API key of the whatsapp business.
     * Required if the DisconnectReason is BUSINESS_INITIATED.
     * Optional for  USER_INITIATED as no API call to WhatsApp is needed.
     *
     * Generated from protobuf field <code>string whatsapp_api_key = 2 [(.logger.redact) = true];</code>
     * @return string
     */
    public function getWhatsappApiKey()
    {
        return $this->whatsapp_api_key;
    }

    /**
     * The API key of the whatsapp business.
     * Required if the DisconnectReason is BUSINESS_INITIATED.
     * Optional for  USER_INITIATED as no API call to WhatsApp is needed.
     *
     * Generated from protobuf field <code>string whatsapp_api_key = 2 [(.logger.redact) = true];</code>
     * @param string $var
     * @return $this
     */
    public function setWhatsappApiKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->whatsapp_api_key = $var;

        return $this;
    }

    /**
     * The reason for disconnecting the call
     *
     * Generated from protobuf field <code>.livekit.DisconnectWhatsAppCallRequest.DisconnectReason disconnect_reason = 3;</code>
     * @return int
     */
    public function getDisconnectReason()
    {
        return $this->disconnect_reason;
    }

    /**
     * The reason for disconnecting the call
     *
     * Generated from protobuf field <code>.livekit.DisconnectWhatsAppCallRequest.DisconnectReason disconnect_reason = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setDisconnectReason($var)
    {
        GPBUtil::checkEnum($var, \Livekit\DisconnectWhatsAppCallRequest\DisconnectReason::class);
        $this->disconnect_reason = $var;

        return $this;
    }

}

