<?php

class CF_RuleFilterData
{
    /** @var array{id: int, type: string}|null */
    public $group;

    /** @var CF_RuleFilterDataFilters|null */
    public $filters;

    public function __construct($data = [])
    {
        $this->group = $data['group'] ?? null;
        $this->filters = isset($data['filters']) ? new CF_RuleFilterDataFilters($data['filters']) : null;
    }
}

class CF_RuleFilterDataFilters
{
    /** @var array */
    public $filter;

    /** @var mixed */
    public $hostFilter;

    /** @var array */
    public $hostContextInclude;

    public function __construct($data = [])
    {
        $this->filter = $data['filter'] ?? [];
        $this->hostFilter = $data['hostFilter'] ?? null;
        $this->hostContextInclude = $data['hostContextInclude'] ?? [];
    }
}
