{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-supply-chain/json-schema/amazon-supply-chain-list-data-integration-flows-response-schema.json",
  "title": "ListDataIntegrationFlowsResponse",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-supply-chain-data-integration-flows-api-openapi.yml#/components/schemas/ListDataIntegrationFlowsResponse",
  "type": "object",
  "properties": {
    "flows": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DataIntegrationFlow"
      },
      "description": "The response parameters for ListDataIntegrationFlows."
    },
    "nextToken": {
      "type": "string",
      "description": "The pagination token to fetch the next page of the DataIntegrationFlows."
    }
  },
  "required": [
    "flows"
  ],
  "$defs": {
    "DataIntegrationFlow": {
      "type": "object",
      "properties": {
        "instanceId": {
          "type": "string",
          "description": "The DataIntegrationFlow instance ID."
        },
        "name": {
          "type": "string",
          "description": "The DataIntegrationFlow name."
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DataIntegrationFlowSource"
          },
          "description": "The DataIntegrationFlow source configurations."
        },
        "transformation": {
          "$ref": "#/$defs/DataIntegrationFlowTransformation"
        },
        "target": {
          "$ref": "#/$defs/DataIntegrationFlowTarget"
        },
        "createdTime": {
          "type": "string",
          "description": "The DataIntegrationFlow creation timestamp."
        },
        "lastModifiedTime": {
          "type": "string",
          "description": "The DataIntegrationFlow last modified timestamp."
        }
      },
      "required": [
        "instanceId",
        "name",
        "sources",
        "transformation",
        "target",
        "createdTime",
        "lastModifiedTime"
      ]
    },
    "DataIntegrationFlowDatasetOptions": {
      "type": "object",
      "properties": {
        "loadType": {
          "type": "string",
          "enum": [
            "INCREMENTAL",
            "REPLACE"
          ],
          "description": "The target dataset's data load type. This only affects how source S3 files are selected in the S3-to-dataset flow. REPLACE - Target dataset will get replaced with the new file added under the source s3 prefix. INCREMENTAL - Target dataset will get updated with the up-to-date content under S3 prefix incorporating any file additions or removals there."
        },
        "dedupeRecords": {
          "type": "boolean",
          "description": "The option to perform deduplication on data records sharing same primary key values. If disabled, transformed data with duplicate primary key values will ingest into dataset, for datasets within asc namespace, such duplicates will cause ingestion fail. If enabled without dedupeStrategy, deduplication is done by retaining a random data record among those sharing the same primary key values. If enabled with dedupeStragtegy, the deduplication is done following the strategy. Note that target dataset may have partition configured, when dedupe is enabled, it only dedupe against primary keys and reta"
        },
        "dedupeStrategy": {
          "$ref": "#/$defs/DataIntegrationFlowDedupeStrategy"
        }
      }
    },
    "DataIntegrationFlowDatasetSourceConfiguration": {
      "type": "object",
      "properties": {
        "datasetIdentifier": {
          "type": "string",
          "description": "The ARN of the dataset."
        },
        "options": {
          "$ref": "#/$defs/DataIntegrationFlowDatasetOptions"
        }
      },
      "required": [
        "datasetIdentifier"
      ]
    },
    "DataIntegrationFlowDatasetTargetConfiguration": {
      "type": "object",
      "properties": {
        "datasetIdentifier": {
          "type": "string",
          "description": "The dataset ARN."
        },
        "options": {
          "$ref": "#/$defs/DataIntegrationFlowDatasetOptions"
        }
      },
      "required": [
        "datasetIdentifier"
      ]
    },
    "DataIntegrationFlowDedupeStrategy": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "FIELD_PRIORITY"
          ],
          "description": "The type of the deduplication strategy. FIELD_PRIORITY - Field priority configuration for the deduplication strategy specifies an ordered list of fields used to tie-break the data records sharing the same primary key values. Fields earlier in the list have higher priority for evaluation. For each field, the sort order determines whether to retain data record with larger or smaller field value."
        },
        "fieldPriority": {
          "$ref": "#/$defs/DataIntegrationFlowFieldPriorityDedupeStrategyConfiguration"
        }
      },
      "required": [
        "type"
      ]
    },
    "DataIntegrationFlowFieldPriorityDedupeField": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the deduplication field. Must exist in the dataset and not be a primary key."
        },
        "sortOrder": {
          "type": "string",
          "enum": [
            "ASC",
            "DESC"
          ],
          "description": "The sort order for the deduplication field."
        }
      },
      "required": [
        "name",
        "sortOrder"
      ]
    },
    "DataIntegrationFlowFieldPriorityDedupeStrategyConfiguration": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DataIntegrationFlowFieldPriorityDedupeField"
          },
          "description": "The list of field names and their sort order for deduplication, arranged in descending priority from highest to lowest."
        }
      },
      "required": [
        "fields"
      ]
    },
    "DataIntegrationFlowS3Options": {
      "type": "object",
      "properties": {
        "fileType": {
          "type": "string",
          "enum": [
            "CSV",
            "PARQUET",
            "JSON"
          ],
          "description": "The Amazon S3 file type in S3 options."
        }
      }
    },
    "DataIntegrationFlowS3SourceConfiguration": {
      "type": "object",
      "properties": {
        "bucketName": {
          "type": "string",
          "description": "The bucketName of the S3 source objects."
        },
        "prefix": {
          "type": "string",
          "description": "The prefix of the S3 source objects. To trigger data ingestion, S3 files need to be put under s3://bucketName/prefix/."
        },
        "options": {
          "$ref": "#/$defs/DataIntegrationFlowS3Options"
        }
      },
      "required": [
        "bucketName",
        "prefix"
      ]
    },
    "DataIntegrationFlowS3TargetConfiguration": {
      "type": "object",
      "properties": {
        "bucketName": {
          "type": "string",
          "description": "The bucketName of the S3 target objects."
        },
        "prefix": {
          "type": "string",
          "description": "The prefix of the S3 target objects."
        },
        "options": {
          "$ref": "#/$defs/DataIntegrationFlowS3Options"
        }
      },
      "required": [
        "bucketName",
        "prefix"
      ]
    },
    "DataIntegrationFlowSQLTransformationConfiguration": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "The transformation SQL query body based on SparkSQL."
        }
      },
      "required": [
        "query"
      ]
    },
    "DataIntegrationFlowSource": {
      "type": "object",
      "properties": {
        "sourceType": {
          "type": "string",
          "enum": [
            "S3",
            "DATASET"
          ],
          "description": "The DataIntegrationFlow source type."
        },
        "sourceName": {
          "type": "string",
          "description": "The DataIntegrationFlow source name that can be used as table alias in SQL transformation query."
        },
        "s3Source": {
          "$ref": "#/$defs/DataIntegrationFlowS3SourceConfiguration"
        },
        "datasetSource": {
          "$ref": "#/$defs/DataIntegrationFlowDatasetSourceConfiguration"
        }
      },
      "required": [
        "sourceType",
        "sourceName"
      ]
    },
    "DataIntegrationFlowTarget": {
      "type": "object",
      "properties": {
        "targetType": {
          "type": "string",
          "enum": [
            "S3",
            "DATASET"
          ],
          "description": "The DataIntegrationFlow target type."
        },
        "s3Target": {
          "$ref": "#/$defs/DataIntegrationFlowS3TargetConfiguration"
        },
        "datasetTarget": {
          "$ref": "#/$defs/DataIntegrationFlowDatasetTargetConfiguration"
        }
      },
      "required": [
        "targetType"
      ]
    },
    "DataIntegrationFlowTransformation": {
      "type": "object",
      "properties": {
        "transformationType": {
          "type": "string",
          "enum": [
            "SQL",
            "NONE"
          ],
          "description": "The DataIntegrationFlow transformation type."
        },
        "sqlTransformation": {
          "$ref": "#/$defs/DataIntegrationFlowSQLTransformationConfiguration"
        }
      },
      "required": [
        "transformationType"
      ]
    }
  }
}