public function setFrequency($frequency) {
    if ($frequency >= 0 && $frequency <= 10) {
      $this->frequency = $frequency;
    }
    else {
      $this->triggerError('Invalid value for frequency advertisingSettings.');
    }
    return $this;
  }