module campaign <https://advertising.amazon.com/api-model> is

  import [
    dc
    owl
    rdf
    skos
    xsd
  ]


  @skos:version = xsd:decimal(2) ;; this is a badly spelled comment.

  datatype Name <- xsd:string is
    @xsd:minLength = 5
    @xsd:maxLength = 25
  end

  datatype CampaignId <- xsd:string is
    @skos:prefLabel = [
      "Campaign Identifier"@en
      "Identified de campagne"@fr
    ]
  end

  enum State of
    @owl:equivalentClass = sdml:unsigned
    Running is
      @rdf:value = 1
    end
    Paused is
      @rdf:value = 2
    end
    error is
      @rdf:value = 3
    end
  end

  structure Tag is
    key -> xsd:NMTOKEN
    value -> {0..} rdf:langString
  end

  entity Ad

  entity AdGroup

; entity UnusedAdGroup

  entity Campaign is
    identity campaignId -> CampaignId

    name -> unknown

    tag -> {0..} Tag

    target -> {1..} TargetCriteria
  end

  entity AudienceTarget

  entity GeographicTarget

  union TargetCriteria of
    AudienceTarget as Audience
    GeographicTarget as Geographic
  end

end
