class LogStorageInfos {

    @VisibleForTesting
    static Optional<S3Account> parseS3AccessPointArn(String s3AccessPointArn) {
        String trimmed = StringExt.safeTrim(s3AccessPointArn);
        if (trimmed.isEmpty()) {
            return Optional.empty();
        }
        Matcher matcher = S3_ACCESS_POINT_ARN_RE.matcher(s3AccessPointArn);
        if (!matcher.matches()) {
            return Optional.empty();
        }
        return Optional.of(new S3Account(matcher.group(2), matcher.group(1)));
    }

}