Puppet configure firewall rules

I faced this question today and failed. It asked me to create classes in one file i got an error saying
- it seems like class 'firewall_node1' is not defined properly in 'media.pp' for agent node 1 i.e App Server 1 on Jump Server But I guess I created classes correctly.

My classes are look like:

class firewall_node1 {
  firewalld_rich_rule { 'Accept 6200 from barny':
    ensure => present,
     zone   => 'public',
     action  => 'accept',
    port => {
      'port' => 6200,
      'protocol' => 'tcp',
    },
  }
}

class firewall_node2 {
  firewalld_rich_rule { 'Accept 9006 from barny':
    ensure => present,
    zone   => 'public',
    action  => 'accept',
    port => {
      'port' => 9006,
      'protocol' => 'tcp',
    },
  }
}

class firewall_node3 {
  firewalld_rich_rule { 'Accept 8094 from barny':
    ensure => present,
    zone   => 'public',
    action  => 'accept',
    port => {
      'port' => 8094,
      'protocol' => 'tcp',
    },
  }
}

any help on this? what I missed?