<?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.AcceptWhatsAppCallRequest</code>
 */
class AcceptWhatsAppCallRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required - The phone number id of the business that is conencting the call
     *
     * Generated from protobuf field <code>string whatsapp_phone_number_id = 1 [(.logger.name) = "whatsappPhoneNumberID"];</code>
     */
    protected $whatsapp_phone_number_id = '';
    /**
     * Required - The API key of the business that is connecting the call
     *
     * Generated from protobuf field <code>string whatsapp_api_key = 2 [(.logger.redact) = true];</code>
     */
    protected $whatsapp_api_key = '';
    /**
     * Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc.
     *
     * Generated from protobuf field <code>string whatsapp_cloud_api_version = 13;</code>
     */
    protected $whatsapp_cloud_api_version = '';
    /**
     * Required - Call ID sent by Meta
     *
     * Generated from protobuf field <code>string whatsapp_call_id = 3 [(.logger.name) = "whatsappCallID"];</code>
     */
    protected $whatsapp_call_id = '';
    /**
     * Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes.
     *
     * Generated from protobuf field <code>string whatsapp_biz_opaque_callback_data = 4;</code>
     */
    protected $whatsapp_biz_opaque_callback_data = '';
    /**
     * Required - The call accept webhook comes with SDP from Meta
     * It is the for a user initiated call
     *
     * Generated from protobuf field <code>.livekit.SessionDescription sdp = 5;</code>
     */
    protected $sdp = null;
    /**
     * Optional - What LiveKit room should this participant be connected too
     *
     * Generated from protobuf field <code>string room_name = 6;</code>
     */
    protected $room_name = '';
    /**
     * Optional - Agents to dispatch the call to
     *
     * Generated from protobuf field <code>repeated .livekit.RoomAgentDispatch agents = 7;</code>
     */
    private $agents;
    /**
     * Optional - Identity of the participant in LiveKit room
     * This is used for logging purposes, so it is advised to not put PII in this field.
     *
     * Generated from protobuf field <code>string participant_identity = 8;</code>
     */
    protected $participant_identity = '';
    /**
     * Optional - Name of the participant in LiveKit room
     *
     * Generated from protobuf field <code>string participant_name = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $participant_name = '';
    /**
     * Optional - User-defined metadata. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>string participant_metadata = 10 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    protected $participant_metadata = '';
    /**
     * Optional - User-defined attributes. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 11 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     */
    private $participant_attributes;
    /**
     * Optional - Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 12;</code>
     */
    protected $destination_country = '';
    /**
     * Max time for the callee to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 14;</code>
     */
    protected $ringing_timeout = null;
    /**
     * Wait for the answer for the call before returning.
     *
     * Generated from protobuf field <code>bool wait_until_answered = 15;</code>
     */
    protected $wait_until_answered = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $whatsapp_phone_number_id
     *           Required - The phone number id of the business that is conencting the call
     *     @type string $whatsapp_api_key
     *           Required - The API key of the business that is connecting the call
     *     @type string $whatsapp_cloud_api_version
     *           Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc.
     *     @type string $whatsapp_call_id
     *           Required - Call ID sent by Meta
     *     @type string $whatsapp_biz_opaque_callback_data
     *           Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes.
     *     @type \Livekit\SessionDescription $sdp
     *           Required - The call accept webhook comes with SDP from Meta
     *           It is the for a user initiated call
     *     @type string $room_name
     *           Optional - What LiveKit room should this participant be connected too
     *     @type \Livekit\RoomAgentDispatch[] $agents
     *           Optional - Agents to dispatch the call to
     *     @type string $participant_identity
     *           Optional - Identity of the participant in LiveKit room
     *           This is used for logging purposes, so it is advised to not put PII in this field.
     *     @type string $participant_name
     *           Optional - Name of the participant in LiveKit room
     *     @type string $participant_metadata
     *           Optional - User-defined metadata. Will be attached to a created Participant in the room.
     *     @type array|\Google\Protobuf\Internal\MapField $participant_attributes
     *           Optional - User-defined attributes. Will be attached to a created Participant in the room.
     *     @type string $destination_country
     *           Optional - Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *     @type \Google\Protobuf\Duration $ringing_timeout
     *           Max time for the callee to answer the call.
     *     @type bool $wait_until_answered
     *           Wait for the answer for the call before returning.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitConnectorWhatsapp::initOnce();
        parent::__construct($data);
    }

    /**
     * Required - The phone number id of the business that is conencting the call
     *
     * Generated from protobuf field <code>string whatsapp_phone_number_id = 1 [(.logger.name) = "whatsappPhoneNumberID"];</code>
     * @return string
     */
    public function getWhatsappPhoneNumberId()
    {
        return $this->whatsapp_phone_number_id;
    }

    /**
     * Required - The phone number id of the business that is conencting the call
     *
     * Generated from protobuf field <code>string whatsapp_phone_number_id = 1 [(.logger.name) = "whatsappPhoneNumberID"];</code>
     * @param string $var
     * @return $this
     */
    public function setWhatsappPhoneNumberId($var)
    {
        GPBUtil::checkString($var, True);
        $this->whatsapp_phone_number_id = $var;

        return $this;
    }

    /**
     * Required - The API key of the business that is connecting the call
     *
     * Generated from protobuf field <code>string whatsapp_api_key = 2 [(.logger.redact) = true];</code>
     * @return string
     */
    public function getWhatsappApiKey()
    {
        return $this->whatsapp_api_key;
    }

    /**
     * Required - The API key of the business that is connecting the call
     *
     * 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;
    }

    /**
     * Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc.
     *
     * Generated from protobuf field <code>string whatsapp_cloud_api_version = 13;</code>
     * @return string
     */
    public function getWhatsappCloudApiVersion()
    {
        return $this->whatsapp_cloud_api_version;
    }

    /**
     * Required - WhatsApp Cloud API version, eg: 23.0, 24.0, etc.
     *
     * Generated from protobuf field <code>string whatsapp_cloud_api_version = 13;</code>
     * @param string $var
     * @return $this
     */
    public function setWhatsappCloudApiVersion($var)
    {
        GPBUtil::checkString($var, True);
        $this->whatsapp_cloud_api_version = $var;

        return $this;
    }

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

        return $this;
    }

    /**
     * Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes.
     *
     * Generated from protobuf field <code>string whatsapp_biz_opaque_callback_data = 4;</code>
     * @return string
     */
    public function getWhatsappBizOpaqueCallbackData()
    {
        return $this->whatsapp_biz_opaque_callback_data;
    }

    /**
     * Optional - An arbitrary string you can pass in that is useful for tracking and logging purposes.
     *
     * Generated from protobuf field <code>string whatsapp_biz_opaque_callback_data = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setWhatsappBizOpaqueCallbackData($var)
    {
        GPBUtil::checkString($var, True);
        $this->whatsapp_biz_opaque_callback_data = $var;

        return $this;
    }

    /**
     * Required - The call accept webhook comes with SDP from Meta
     * It is the for a user initiated call
     *
     * Generated from protobuf field <code>.livekit.SessionDescription sdp = 5;</code>
     * @return \Livekit\SessionDescription|null
     */
    public function getSdp()
    {
        return $this->sdp;
    }

    public function hasSdp()
    {
        return isset($this->sdp);
    }

    public function clearSdp()
    {
        unset($this->sdp);
    }

    /**
     * Required - The call accept webhook comes with SDP from Meta
     * It is the for a user initiated call
     *
     * Generated from protobuf field <code>.livekit.SessionDescription sdp = 5;</code>
     * @param \Livekit\SessionDescription $var
     * @return $this
     */
    public function setSdp($var)
    {
        GPBUtil::checkMessage($var, \Livekit\SessionDescription::class);
        $this->sdp = $var;

        return $this;
    }

    /**
     * Optional - What LiveKit room should this participant be connected too
     *
     * Generated from protobuf field <code>string room_name = 6;</code>
     * @return string
     */
    public function getRoomName()
    {
        return $this->room_name;
    }

    /**
     * Optional - What LiveKit room should this participant be connected too
     *
     * Generated from protobuf field <code>string room_name = 6;</code>
     * @param string $var
     * @return $this
     */
    public function setRoomName($var)
    {
        GPBUtil::checkString($var, True);
        $this->room_name = $var;

        return $this;
    }

    /**
     * Optional - Agents to dispatch the call to
     *
     * Generated from protobuf field <code>repeated .livekit.RoomAgentDispatch agents = 7;</code>
     * @return RepeatedField<\Livekit\RoomAgentDispatch>
     */
    public function getAgents()
    {
        return $this->agents;
    }

    /**
     * Optional - Agents to dispatch the call to
     *
     * Generated from protobuf field <code>repeated .livekit.RoomAgentDispatch agents = 7;</code>
     * @param \Livekit\RoomAgentDispatch[] $var
     * @return $this
     */
    public function setAgents($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\RoomAgentDispatch::class);
        $this->agents = $arr;

        return $this;
    }

    /**
     * Optional - Identity of the participant in LiveKit room
     * This is used for logging purposes, so it is advised to not put PII in this field.
     *
     * Generated from protobuf field <code>string participant_identity = 8;</code>
     * @return string
     */
    public function getParticipantIdentity()
    {
        return $this->participant_identity;
    }

    /**
     * Optional - Identity of the participant in LiveKit room
     * This is used for logging purposes, so it is advised to not put PII in this field.
     *
     * Generated from protobuf field <code>string participant_identity = 8;</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_identity = $var;

        return $this;
    }

    /**
     * Optional - Name of the participant in LiveKit room
     *
     * Generated from protobuf field <code>string participant_name = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getParticipantName()
    {
        return $this->participant_name;
    }

    /**
     * Optional - Name of the participant in LiveKit room
     *
     * Generated from protobuf field <code>string participant_name = 9 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantName($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_name = $var;

        return $this;
    }

    /**
     * Optional - User-defined metadata. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>string participant_metadata = 10 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return string
     */
    public function getParticipantMetadata()
    {
        return $this->participant_metadata;
    }

    /**
     * Optional - User-defined metadata. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>string participant_metadata = 10 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @param string $var
     * @return $this
     */
    public function setParticipantMetadata($var)
    {
        GPBUtil::checkString($var, True);
        $this->participant_metadata = $var;

        return $this;
    }

    /**
     * Optional - User-defined attributes. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 11 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getParticipantAttributes()
    {
        return $this->participant_attributes;
    }

    /**
     * Optional - User-defined attributes. Will be attached to a created Participant in the room.
     *
     * Generated from protobuf field <code>map<string, string> participant_attributes = 11 [(.logger.redact) = true, (.logger.redact_format) = "<redacted ({{ .Size }} bytes)>"];</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setParticipantAttributes($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING);
        $this->participant_attributes = $arr;

        return $this;
    }

    /**
     * Optional - Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 12;</code>
     * @return string
     */
    public function getDestinationCountry()
    {
        return $this->destination_country;
    }

    /**
     * Optional - Country where the call terminates as ISO 3166-1 alpha-2 (https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). This will be used by the livekit infrastructure to route calls.
     *
     * Generated from protobuf field <code>string destination_country = 12;</code>
     * @param string $var
     * @return $this
     */
    public function setDestinationCountry($var)
    {
        GPBUtil::checkString($var, True);
        $this->destination_country = $var;

        return $this;
    }

    /**
     * Max time for the callee to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 14;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getRingingTimeout()
    {
        return $this->ringing_timeout;
    }

    public function hasRingingTimeout()
    {
        return isset($this->ringing_timeout);
    }

    public function clearRingingTimeout()
    {
        unset($this->ringing_timeout);
    }

    /**
     * Max time for the callee to answer the call.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration ringing_timeout = 14;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setRingingTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->ringing_timeout = $var;

        return $this;
    }

    /**
     * Wait for the answer for the call before returning.
     *
     * Generated from protobuf field <code>bool wait_until_answered = 15;</code>
     * @return bool
     */
    public function getWaitUntilAnswered()
    {
        return $this->wait_until_answered;
    }

    /**
     * Wait for the answer for the call before returning.
     *
     * Generated from protobuf field <code>bool wait_until_answered = 15;</code>
     * @param bool $var
     * @return $this
     */
    public function setWaitUntilAnswered($var)
    {
        GPBUtil::checkBool($var);
        $this->wait_until_answered = $var;

        return $this;
    }

}

