-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathUnmanagedAcsAccessGroup.php
More file actions
60 lines (57 loc) · 2.12 KB
/
Copy pathUnmanagedAcsAccessGroup.php
File metadata and controls
60 lines (57 loc) · 2.12 KB
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
<?php
namespace Seam\Objects;
class UnmanagedAcsAccessGroup
{
public static function from_json(mixed $json): UnmanagedAcsAccessGroup|null
{
if (!$json) {
return null;
}
return new self(
access_group_type: $json->access_group_type,
access_group_type_display_name: $json->access_group_type_display_name,
acs_access_group_id: $json->acs_access_group_id,
acs_system_id: $json->acs_system_id,
connected_account_id: $json->connected_account_id,
created_at: $json->created_at,
display_name: $json->display_name,
external_type: $json->external_type,
external_type_display_name: $json->external_type_display_name,
is_managed: $json->is_managed,
name: $json->name,
pending_mutations: array_map(
fn($p) => UnmanagedAcsAccessGroupPendingMutations::from_json(
$p,
),
$json->pending_mutations ?? [],
),
warnings: array_map(
fn($w) => UnmanagedAcsAccessGroupWarnings::from_json($w),
$json->warnings ?? [],
),
workspace_id: $json->workspace_id,
access_schedule: isset($json->access_schedule)
? UnmanagedAcsAccessGroupAccessSchedule::from_json(
$json->access_schedule,
)
: null,
);
}
public function __construct(
public string $access_group_type,
public string $access_group_type_display_name,
public string $acs_access_group_id,
public string $acs_system_id,
public string $connected_account_id,
public string $created_at,
public string $display_name,
public string $external_type,
public string $external_type_display_name,
public bool $is_managed,
public string $name,
public array $pending_mutations,
public array $warnings,
public string $workspace_id,
public UnmanagedAcsAccessGroupAccessSchedule|null $access_schedule,
) {}
}