{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://publicschema.org/agri/AgriculturalServiceRole.schema.json",
  "title": "AgriculturalServiceRole",
  "description": "A dated relationship in which a person, organization or group offers or performs stated agricultural services, such as input supply, pesticide application, machinery hire or seed processing, in stated areas. It does not show qualification, registration or permission.",
  "type": "object",
  "properties": {
    "service_provider": {
      "type": "string",
      "format": "uri",
      "description": "The URI of the person, organization or group that offers or performs the services in this role. The URI identifies the actor, not its registration."
    },
    "agricultural_service": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "input_supply",
          "pesticide_application",
          "seed_processing",
          "seed_packing",
          "seed_marketing",
          "machinery_hire",
          "advisory",
          "animal_health_service",
          "post_harvest",
          "other"
        ],
        "$comment": "https://publicschema.org/vocab/agri/agricultural-service-type",
        "description": "A kind of agricultural service offered or performed in this role."
      }
    },
    "service_area": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "https://publicschema.org/Location.schema.json"
          },
          {
            "type": "string",
            "description": "URI or identifier reference"
          }
        ],
        "description": "A geographic or administrative area in which the service is offered."
      }
    },
    "service_equipment": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "https://publicschema.org/agri/AgriculturalMachine.schema.json"
          },
          {
            "type": "string",
            "description": "URI or identifier reference"
          }
        ],
        "description": "A machine offered or used in this service role, without implying ownership."
      }
    },
    "supplied_product": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uri",
        "description": "The URI of a product specification supplied under this role, such as an agricultural input product, a veterinary medicinal product or a seed lot."
      }
    },
    "start_date": {
      "type": "string",
      "format": "date",
      "description": "The date on which this became effective."
    },
    "end_date": {
      "type": "string",
      "format": "date",
      "description": "The last day on which this is effective. A period includes both its start date and its end date, so a period that applies only on 30 June 2026 has start date 2026-06-30 and end date 2026-06-30."
    }
  }
}
