76 lines
1.9 KiB
PHP
76 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\TenantConfiguration;
|
|
|
|
final class ExchangeRemoteDomainEvidenceNormalizer extends ExchangePowerShellTargetEvidenceNormalizer
|
|
{
|
|
public function resourceType(): string
|
|
{
|
|
return 'remoteDomain';
|
|
}
|
|
|
|
public function normalizerVersion(): string
|
|
{
|
|
return 'exchange-remote-domain-readiness-v1';
|
|
}
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
protected function materialFields(): array
|
|
{
|
|
return [
|
|
'Guid',
|
|
'RemoteDomainId',
|
|
'Identity',
|
|
'DomainName',
|
|
'Name',
|
|
'DisplayName',
|
|
'IsDefault',
|
|
'AllowedOOFType',
|
|
'AutoReplyEnabled',
|
|
'AutoForwardEnabled',
|
|
'MailTipsAccessLevel',
|
|
'MailTipsAccessScope',
|
|
'TargetDeliveryDomain',
|
|
'TNEFEnabled',
|
|
'TrustedMailOutboundEnabled',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return list<list<string>>
|
|
*/
|
|
protected function identityAliasGroups(): array
|
|
{
|
|
return [
|
|
['id', 'sourceId'],
|
|
['Guid', 'RemoteDomainId', 'Identity'],
|
|
];
|
|
}
|
|
|
|
protected function normalizePayload(array $payload, array $identity): array
|
|
{
|
|
$normalized = parent::normalizePayload($payload, $identity);
|
|
|
|
$normalized['remote_domain_class'] = [
|
|
'is_default' => $this->normalizeSettingValue($payload['IsDefault'] ?? $payload['isDefault'] ?? null),
|
|
'domain_name_is_identity' => false,
|
|
];
|
|
$normalized['settings'] = $this->settingGroup($payload, [], [
|
|
'AllowedOOFType',
|
|
'AutoReplyEnabled',
|
|
'AutoForwardEnabled',
|
|
'MailTipsAccessLevel',
|
|
'MailTipsAccessScope',
|
|
'TargetDeliveryDomain',
|
|
'TNEFEnabled',
|
|
'TrustedMailOutboundEnabled',
|
|
]);
|
|
|
|
return $this->sortAssociative($normalized);
|
|
}
|
|
}
|