<?php

namespace App\Model;

final class DeployMethodTypes
{
    public const string MULTICAST = 'multicast';
    public const string MULTICAST_UFTP = 'uftp';
    public const string MULTICAST_UFTP_DIRECT = 'uftp-direct';
    public const string MULTICAST_UDPCAST = 'udpcast';
    public const string MULTICAST_UDPCAST_DIRECT = 'udpcast-direct';
    public const string UNICAST = 'unicast';
    public const string UNICAST_DIRECT = 'unicast-direct';
    public const string TORRENT = 'p2p';
    public const string GIT = 'git';

    private const array DEPLOYMENT_METHOD_TYPES = [
        self::MULTICAST => 'Multicast',
        self::UNICAST => 'Unicast',
        self::TORRENT => 'Torrent',
        self::GIT => 'Git',
    ];

    public static function getDeploymentMethodTypes(): array
    {
        return self::DEPLOYMENT_METHOD_TYPES;
    }

    public static function getDeploymentMethodType(string $type): ?string
    {
        return self::DEPLOYMENT_METHOD_TYPES[$type] ?? null;
    }
    public static function getDeploymentMethodTypeKeys(): array
    {
        return array_keys(self::DEPLOYMENT_METHOD_TYPES);
    }
}