<?php
namespace Claromentis\Core\Ai\Adapters\Vertex\Requests\Text;

$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"] ?: array()) + array("da" . "ta" => base64_decode("ZGF0YQ=" . "="), "_9961f98" . "6823b4be" . "7f5c4cc8" . "379c6b22" . "8" => base64_decode("cGF" . "ydH" . "M="), "_d34599daeb8cca374d3a" . "db38b245839c" => base64_decode("Y29ud" . "GVudH" . "M="), "_0781363cd4daa531106" . "ac6b67b811829" => base64_decode("Z2VuZXJhdGlvb" . "kNvbmZpZw=="), "_a51236f5e7f12" . "cf84a776152098" . "d24a9" => base64_decode("dGV4dA" . "=="), "_d1071a032215f0eb5c4a8e" . "f175f7049d" => base64_decode("cm9s" . "ZQ=="), "_e15567441c24cf597f08568" . "9c722c660" => base64_decode("bWl" . "tZV" . "R5c" . "GU="), "_1a501ec32ec3319bc84490278b6d5b" . "2d" => base64_decode("c2FmZXR5U2V0dGlu" . "Z3M="), "_1f4edb93cab26c83" . "cc0d4781a862f103" => base64_decode("aW5saW5lRGF0Y" . "Q=="));
use Claromentis\Core\Ai\AiRequestInterface;
use Claromentis\Core\Ai\Parts\FilePart;
use Claromentis\Core\Ai\Parts\PartInterface;
use Claromentis\Core\Ai\Parts\TextPart;
use Webmozart\Assert\Assert;




class VertexAiTextRequest implements AiRequestInterface
{
    
    
    
    
    private array $parts;
    
    
    
    
    private string $modelName;
    
    
    
    
    private bool $streaming;
    
    
    
    
    
    
    private VertexAiGenerationConfig $generationConfig;
    
    
    
    
    
    
    private VertexAiSafetySettings $safetySettings;
    
    
    
    
    
    
    
    
    public function __construct(array $_9961f986823b4be7f5c4cc8379c6b228, string $_accd9508aab49e8a94236732a64663dc, $_f407198d2ae7d5f41a9b5f94e136efe9 = false, ?VertexAiGenerationConfig $_0781363cd4daa531106ac6b67b811829 = null, ?VertexAiSafetySettings $_1a501ec32ec3319bc84490278b6d5b2d = null)
    {
        Assert::allIsInstanceOf($_9961f986823b4be7f5c4cc8379c6b228, PartInterface::class);
        $this->parts = $_9961f986823b4be7f5c4cc8379c6b228;
        $this->modelName = $_accd9508aab49e8a94236732a64663dc;
        $this->streaming = $_f407198d2ae7d5f41a9b5f94e136efe9;
        $this->generationConfig = $_0781363cd4daa531106ac6b67b811829 ?? new VertexAiGenerationConfig();
        $this->safetySettings = $_1a501ec32ec3319bc84490278b6d5b2d ?? new VertexAiSafetySettings();
    }
    public function isStreaming() : bool
    {
        return $this->streaming;
    }
    public function getModelName() : string
    {
        return $this->modelName;
    }
    public function getGenerationConfig() : VertexAiGenerationConfig
    {
        return $this->generationConfig;
    }
    public function getSafetySettings() : VertexAiSafetySettings
    {
        return $this->safetySettings;
    }
    public function toArray() : array
    {
        
        
        
        
        $_9961f986823b4be7f5c4cc8379c6b228 = $this->parts;
        $data = [];
        foreach ($_9961f986823b4be7f5c4cc8379c6b228 as $_d962cfd1735adb2dfba46f69c7f15cb8) {
            if ($_d962cfd1735adb2dfba46f69c7f15cb8 instanceof TextPart) {
                $_d34599daeb8cca374d3adb38b245839c = [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_d1071a03221" . "5f0eb5c4a8ef" . "175f7049d"] => $_d962cfd1735adb2dfba46f69c7f15cb8->getRole(), $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_9961f986823b4be7f5c4cc8379c6b2" . "28"] => [[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_a51236f5e7f12cf84a7761520" . "98d24a9"] => $_d962cfd1735adb2dfba46f69c7f15cb8->getValue()]]];
            } else {
                if ($_d962cfd1735adb2dfba46f69c7f15cb8 instanceof FilePart) {
                    $_d34599daeb8cca374d3adb38b245839c = [$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_d1071a032215f0eb5c" . "4a8ef175f7049d"] => $_d962cfd1735adb2dfba46f69c7f15cb8->getRole(), $GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_9961f986823b4be7f5c4cc8379" . "c6b228"] => [[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_1f4edb93cab26c83cc0d478" . "1a862f103"] => [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_e155674" . "41c24cf5" . "97f08568" . "9c722c66" . "0"] => $_d962cfd1735adb2dfba46f69c7f15cb8->getMimeType(), $GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["d" . "a" . "t" . "a"] => $_d962cfd1735adb2dfba46f69c7f15cb8->getValue()]]]];
                }
            }
            $data[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_d34599daeb8cca374d3adb3" . "8b245839c"]][] = $_d34599daeb8cca374d3adb38b245839c;
        }
        $data[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_0781363" . "cd4daa53" . "1106ac6b" . "67b81182" . "9"]] = $this->generationConfig->toArray();
        $data[$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_1a501ec32ec3319bc8449027" . "8b6d5b2d"]] = $this->safetySettings->toArray();
        return $data;
    }
}