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

namespace Livekit;

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

/**
 * Generated from protobuf message <code>livekit.EncryptedPacket</code>
 */
class EncryptedPacket extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption_type = 1;</code>
     */
    protected $encryption_type = 0;
    /**
     * Generated from protobuf field <code>bytes iv = 2;</code>
     */
    protected $iv = '';
    /**
     * Generated from protobuf field <code>uint32 key_index = 3;</code>
     */
    protected $key_index = 0;
    /**
     * This is an encrypted EncryptedPacketPayload message representation
     *
     * Generated from protobuf field <code>bytes encrypted_value = 4;</code>
     */
    protected $encrypted_value = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $encryption_type
     *     @type string $iv
     *     @type int $key_index
     *     @type string $encrypted_value
     *           This is an encrypted EncryptedPacketPayload message representation
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\LivekitModels::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption_type = 1;</code>
     * @return int
     */
    public function getEncryptionType()
    {
        return $this->encryption_type;
    }

    /**
     * Generated from protobuf field <code>.livekit.Encryption.Type encryption_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEncryptionType($var)
    {
        GPBUtil::checkEnum($var, \Livekit\Encryption\Type::class);
        $this->encryption_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bytes iv = 2;</code>
     * @return string
     */
    public function getIv()
    {
        return $this->iv;
    }

    /**
     * Generated from protobuf field <code>bytes iv = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setIv($var)
    {
        GPBUtil::checkString($var, False);
        $this->iv = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 key_index = 3;</code>
     * @return int
     */
    public function getKeyIndex()
    {
        return $this->key_index;
    }

    /**
     * Generated from protobuf field <code>uint32 key_index = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setKeyIndex($var)
    {
        GPBUtil::checkUint32($var);
        $this->key_index = $var;

        return $this;
    }

    /**
     * This is an encrypted EncryptedPacketPayload message representation
     *
     * Generated from protobuf field <code>bytes encrypted_value = 4;</code>
     * @return string
     */
    public function getEncryptedValue()
    {
        return $this->encrypted_value;
    }

    /**
     * This is an encrypted EncryptedPacketPayload message representation
     *
     * Generated from protobuf field <code>bytes encrypted_value = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setEncryptedValue($var)
    {
        GPBUtil::checkString($var, False);
        $this->encrypted_value = $var;

        return $this;
    }

}

