-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathEnvironmentResponse.php
78 lines (56 loc) · 1.81 KB
/
EnvironmentResponse.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
namespace AcquiaCloudApi\Response;
class EnvironmentResponse
{
public string $uuid;
public string $label;
public string $name;
public object $application;
/**
* @var array<string> $domains
*/
public array $domains;
public string $active_domain;
public string $default_domain;
public ?string $image_url;
public ?string $sshUrl;
/**
* @var array<string> $ips
*/
public array $ips;
public ?string $region;
public string $status;
public string $type;
public object $vcs;
public object $flags;
public ?object $configuration;
public object $links;
public string $platform;
public string $balancer;
public ?object $artifact;
public function __construct(object $environment)
{
$this->uuid = $environment->id;
$this->label = $environment->label;
$this->name = $environment->name;
$this->application = $environment->application;
$this->domains = $environment->domains;
$this->active_domain = $environment->active_domain;
$this->default_domain = $environment->default_domain;
$this->image_url = $environment->image_url;
if (property_exists($environment, 'ssh_url')) {
$this->sshUrl = $environment->ssh_url;
}
$this->ips = $environment->ips;
$this->region = $environment->region;
$this->balancer = $environment->balancer;
$this->platform = $environment->platform;
$this->status = $environment->status;
$this->type = $environment->type;
$this->vcs = $environment->vcs;
$this->configuration = $environment->configuration;
$this->flags = $environment->flags;
$this->artifact = $environment->artifact;
$this->links = $environment->_links;
}
}