Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
BareMetalCreate
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
3 / 3
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace Vultr\VultrPhp\Services\BareMetal;
6
7use Vultr\VultrPhp\Util\ModelOptions;
8
9/**
10 * Options to create a baremetal machine.
11 *
12 * @see https://www.vultr.com/api/#operation/create-baremetal
13 */
14class BareMetalCreate extends ModelOptions
15{
16    // Required Parameters.
17    protected string $region;
18    protected string $plan;
19
20    // 1 of these are required.
21    protected ?int $os_id = null;
22    protected ?string $snapshot_id = null;
23    protected ?int $app_id = null;
24    protected ?string $image_id = null;
25
26    // Optional Parameters.
27    protected ?string $script_id = null;
28    protected ?bool $enable_ipv6 = null;
29    protected ?array $sshkey_id = null;
30    protected ?string $user_data = null;
31    protected ?string $label = null;
32    protected ?bool $activation_email = null;
33    protected ?string $hostname = null;
34    protected ?string $reserved_ip = null;
35    protected ?bool $persistent_pxe = null;
36    protected ?array $tags = null;
37
38    public function __construct(string $region, string $plan)
39    {
40        $this->region = $region;
41        $this->plan = $plan;
42        parent::__construct();
43    }
44}