{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-sitewise/json-schema/amazon-iot-sitewise-batch-associate-data-segments-to-dataset-response-schema.json",
  "title": "BatchAssociateDataSegmentsToDatasetResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-sitewise-data-segments-api-openapi.yml#/components/schemas/BatchAssociateDataSegmentsToDatasetResponse",
  "type": "object",
  "properties": {
    "datasetId": {
      "type": "string",
      "description": "The ID of the dataset."
    },
    "datasetVersion": {
      "type": "string",
      "description": "The version of the dataset after association."
    },
    "failedAssociations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/FailedDataSegmentAssociation"
      },
      "description": "A list of data segment associations that failed."
    }
  },
  "required": [
    "datasetId",
    "datasetVersion",
    "failedAssociations"
  ],
  "$defs": {
    "FailedDataSegmentAssociation": {
      "type": "object",
      "properties": {
        "sourceDatasetId": {
          "type": "string",
          "description": "The ID of the source dataset."
        },
        "timeSeriesId": {
          "type": "string",
          "description": "The ID of the time series."
        },
        "startTimestamp": {
          "$ref": "#/$defs/TimeInNanos"
        },
        "endTimestamp": {
          "$ref": "#/$defs/TimeInNanos"
        },
        "errorCode": {
          "type": "string",
          "enum": [
            "INTERNAL_FAILURE",
            "VALIDATION_ERROR",
            "RESOURCE_NOT_FOUND",
            "LIMIT_EXCEEDED",
            "CONFLICTING_OPERATION"
          ],
          "description": "The error code for the failed association."
        },
        "errorMessage": {
          "type": "string",
          "description": "The error message for the failed association."
        }
      },
      "required": [
        "sourceDatasetId",
        "timeSeriesId",
        "startTimestamp",
        "endTimestamp",
        "errorCode",
        "errorMessage"
      ]
    },
    "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"
      ]
    }
  }
}