<?php
/**
 * @package     MefisAssetBridge
 * @subpackage  MefisAssetBridgeCore_Api_Storage_Dto
 *
 * @copyright   Copyright (C) 2025 Goran Usljebrka. All rights reserved.
 * @license     Proprietary — No resale or incorporation into other projects without explicit written permission. see LICENSE.txt
 */
namespace MefisAssetBridgeCore\Api\Storage;

/**
 * Internal DTO for S3 storage operations
 * This is used internally by S3Storage and converted to ApiResponse for public API
 */
class StorageResultDto
{
    private bool $status;
    private string $method;
    private string $timestamp;
    private ?string $message;
    private ?array $data;

    public function __construct(
        bool $status,
        string $method,
        ?string $message = null,
        ?array $data = null
    ) {
        $this->status = $status;
        $this->method = $method;
        $this->timestamp = date('Y-m-d H:i:s');
        $this->message = $message;
        $this->data = $data;
    }

    public function isSuccess(): bool
    {
        return $this->status;
    }

    public function getMethod(): string
    {
        return $this->method;
    }

    public function getMessage(): ?string
    {
        return $this->message;
    }

    public function getData(): ?array
    {
        return $this->data;
    }

    public function getTimestamp(): string
    {
        return $this->timestamp;
    }
}
