public static function fromData(array $data)
    {
        $policies = [];
        foreach (isset($data['schedule']) ? $data['schedule'] : [] as $policyData) {
            $policies[] = new Policy($policyData['interval'], $policyData['count']);
        }

        return new static($policies, isset($data['manual_count']) ? $data['manual_count'] : 1);
    }