78 lines
1.9 KiB
PHP
78 lines
1.9 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Services\TenantConfiguration;
|
|
|
|
final class ExchangeInboundConnectorEvidenceNormalizer extends ExchangePowerShellTargetEvidenceNormalizer
|
|
{
|
|
public function resourceType(): string
|
|
{
|
|
return 'inboundConnector';
|
|
}
|
|
|
|
public function normalizerVersion(): string
|
|
{
|
|
return 'exchange-inbound-connector-readiness-v1';
|
|
}
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
protected function materialFields(): array
|
|
{
|
|
return [
|
|
'Guid',
|
|
'ConnectorId',
|
|
'Identity',
|
|
'Name',
|
|
'DisplayName',
|
|
'ConnectorType',
|
|
'Enabled',
|
|
'RequireTls',
|
|
'SenderDomains',
|
|
'SenderIPAddresses',
|
|
'TlsSenderCertificateName',
|
|
'AssociatedAcceptedDomains',
|
|
'RestrictDomainsToIPAddresses',
|
|
'CloudServicesMailEnabled',
|
|
'ConnectorSource',
|
|
'SmartHosts',
|
|
'Comment',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return list<list<string>>
|
|
*/
|
|
protected function identityAliasGroups(): array
|
|
{
|
|
return [
|
|
['id', 'sourceId'],
|
|
['Guid', 'ConnectorId', 'Identity'],
|
|
];
|
|
}
|
|
|
|
protected function normalizePayload(array $payload, array $identity): array
|
|
{
|
|
$normalized = parent::normalizePayload($payload, $identity);
|
|
|
|
$normalized['routing'] = $this->settingGroup($payload, [], [
|
|
'ConnectorType',
|
|
'Enabled',
|
|
'RequireTls',
|
|
'SenderDomains',
|
|
'SenderIPAddresses',
|
|
'TlsSenderCertificateName',
|
|
'AssociatedAcceptedDomains',
|
|
'RestrictDomainsToIPAddresses',
|
|
'CloudServicesMailEnabled',
|
|
'ConnectorSource',
|
|
'SmartHosts',
|
|
'Comment',
|
|
]);
|
|
|
|
return $this->sortAssociative($normalized);
|
|
}
|
|
}
|