{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-create-enrichment-job-request-schema.json",
  "title": "CreateEnrichmentJobRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-enrichment-jobs-api-openapi.yml#/components/schemas/CreateEnrichmentJobRequest",
  "type": "object",
  "properties": {
    "workspaceName": {
      "type": "string",
      "description": "The name of the IoT SiteWise workspace containing the video data to analyze."
    },
    "jobConfiguration": {
      "$ref": "#/$defs/EnrichmentJobConfiguration"
    },
    "clientToken": {
      "type": "string",
      "description": "Optional unique token that makes the operation idempotent. If you submit the same request with the same token within the idempotency window, the service returns the original job without creating a duplicate. Use a UUID or timestamp-based token for each unique request."
    }
  },
  "required": [
    "workspaceName",
    "jobConfiguration"
  ],
  "$defs": {
    "EnrichmentJobConfiguration": {
      "type": "object",
      "properties": {
        "eventDetection": {
          "$ref": "#/$defs/EventDetection"
        }
      },
      "description": "Exactly one member is set."
    },
    "EnrichmentTrimSettings": {
      "type": "object",
      "properties": {
        "startTime": {
          "$ref": "#/$defs/TimeInNanos"
        },
        "endTime": {
          "$ref": "#/$defs/TimeInNanos"
        }
      },
      "required": [
        "startTime",
        "endTime"
      ]
    },
    "EventDetection": {
      "type": "object",
      "properties": {
        "datasetId": {
          "type": "string",
          "description": "The IoT SiteWise dataset ID containing the video time-series data to analyze. Query IoT SiteWise to discover available datasets in your workspace."
        },
        "timeSeriesId": {
          "type": "string",
          "description": "Unique system identifier for the video time series to analyze. Specify either timeSeriesId or propertyAlias, but not both. Use this when you have the system-generated time series identifier from IoT SiteWise."
        },
        "propertyAlias": {
          "type": "string",
          "description": "Human-readable alias for the video time series to analyze (e.g., /camera/warehouse/zone-a). Specify either propertyAlias or timeSeriesId, but not both. Use this when you have configured friendly aliases in IoT SiteWise for better readability."
        },
        "trimSettings": {
          "$ref": "#/$defs/EnrichmentTrimSettings"
        }
      },
      "required": [
        "datasetId",
        "trimSettings"
      ]
    },
    "TimeInNanos": {
      "type": "object",
      "properties": {
        "timeInSeconds": {
          "type": "integer",
          "description": "The timestamp date, in seconds, in the Unix epoch format. Fractional nanosecond data is provided by offsetInNanos."
        },
        "offsetInNanos": {
          "type": "integer",
          "description": "The nanosecond offset from timeInSeconds."
        }
      },
      "required": [
        "timeInSeconds"
      ]
    }
  }
}