{
 "additionalProperties": false,
 "createOnlyProperties": [
  "/properties/Name",
  "/properties/DatabaseName",
  "/properties/CatalogId"
 ],
 "definitions": {
  "Column": {
   "additionalProperties": false,
   "properties": {
    "Comment": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    },
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Name"
   ],
   "type": "object"
  },
  "IcebergInput": {
   "additionalProperties": false,
   "properties": {
    "IcebergTableInput": {
     "$ref": "#/definitions/IcebergTableInput"
    },
    "MetadataOperation": {
     "$ref": "#/definitions/MetadataOperation"
    },
    "Version": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "IcebergPartitionField": {
   "additionalProperties": false,
   "properties": {
    "FieldId": {
     "type": "integer"
    },
    "Name": {
     "type": "string"
    },
    "SourceId": {
     "type": "integer"
    },
    "Transform": {
     "type": "string"
    }
   },
   "required": [
    "SourceId",
    "Transform",
    "Name"
   ],
   "type": "object"
  },
  "IcebergPartitionSpec": {
   "additionalProperties": false,
   "properties": {
    "Fields": {
     "items": {
      "$ref": "#/definitions/IcebergPartitionField"
     },
     "type": "array",
     "uniqueItems": false
    },
    "SpecId": {
     "type": "integer"
    }
   },
   "required": [
    "Fields"
   ],
   "type": "object"
  },
  "IcebergSchema": {
   "additionalProperties": false,
   "properties": {
    "Fields": {
     "items": {
      "$ref": "#/definitions/IcebergStructField"
     },
     "type": "array",
     "uniqueItems": false
    },
    "IdentifierFieldIds": {
     "items": {
      "type": "integer"
     },
     "type": "array",
     "uniqueItems": false
    },
    "SchemaId": {
     "type": "integer"
    },
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Fields"
   ],
   "type": "object"
  },
  "IcebergSortField": {
   "additionalProperties": false,
   "properties": {
    "Direction": {
     "type": "string"
    },
    "NullOrder": {
     "type": "string"
    },
    "SourceId": {
     "type": "integer"
    },
    "Transform": {
     "type": "string"
    }
   },
   "required": [
    "SourceId",
    "NullOrder",
    "Transform",
    "Direction"
   ],
   "type": "object"
  },
  "IcebergSortOrder": {
   "additionalProperties": false,
   "properties": {
    "Fields": {
     "items": {
      "$ref": "#/definitions/IcebergSortField"
     },
     "type": "array",
     "uniqueItems": false
    },
    "OrderId": {
     "type": "integer"
    }
   },
   "required": [
    "Fields",
    "OrderId"
   ],
   "type": "object"
  },
  "IcebergStructField": {
   "additionalProperties": false,
   "properties": {
    "Doc": {
     "type": "string"
    },
    "Id": {
     "type": "integer"
    },
    "Name": {
     "type": "string"
    },
    "Required": {
     "type": "boolean"
    },
    "Type": {
     "type": "string"
    }
   },
   "required": [
    "Type",
    "Required",
    "Id",
    "Name"
   ],
   "type": "object"
  },
  "IcebergTableInput": {
   "additionalProperties": false,
   "properties": {
    "Location": {
     "type": "string"
    },
    "PartitionSpec": {
     "$ref": "#/definitions/IcebergPartitionSpec"
    },
    "Properties": {
     "type": "object"
    },
    "Schema": {
     "$ref": "#/definitions/IcebergSchema"
    },
    "WriteOrder": {
     "$ref": "#/definitions/IcebergSortOrder"
    }
   },
   "required": [
    "Schema",
    "Location"
   ],
   "type": "object"
  },
  "MetadataOperation": {
   "type": "string"
  },
  "OpenTableFormatInput": {
   "additionalProperties": false,
   "properties": {
    "IcebergInput": {
     "$ref": "#/definitions/IcebergInput"
    }
   },
   "type": "object"
  },
  "Order": {
   "additionalProperties": false,
   "properties": {
    "Column": {
     "type": "string"
    },
    "SortOrder": {
     "type": "integer"
    }
   },
   "required": [
    "Column",
    "SortOrder"
   ],
   "type": "object"
  },
  "SchemaId": {
   "additionalProperties": false,
   "properties": {
    "RegistryName": {
     "type": "string"
    },
    "SchemaArn": {
     "type": "string"
    },
    "SchemaName": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "SchemaReference": {
   "additionalProperties": false,
   "properties": {
    "SchemaId": {
     "$ref": "#/definitions/SchemaId"
    },
    "SchemaVersionId": {
     "type": "string"
    },
    "SchemaVersionNumber": {
     "type": "integer"
    }
   },
   "type": "object"
  },
  "SerdeInfo": {
   "additionalProperties": false,
   "properties": {
    "Name": {
     "type": "string"
    },
    "Parameters": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "SerializationLibrary": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "SkewedInfo": {
   "additionalProperties": false,
   "properties": {
    "SkewedColumnNames": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "SkewedColumnValueLocationMaps": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "SkewedColumnValues": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  },
  "StorageDescriptor": {
   "additionalProperties": false,
   "properties": {
    "BucketColumns": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Columns": {
     "items": {
      "$ref": "#/definitions/Column"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Compressed": {
     "type": "boolean"
    },
    "InputFormat": {
     "type": "string"
    },
    "Location": {
     "type": "string"
    },
    "NumberOfBuckets": {
     "type": "integer"
    },
    "OutputFormat": {
     "type": "string"
    },
    "Parameters": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "SchemaReference": {
     "$ref": "#/definitions/SchemaReference"
    },
    "SerdeInfo": {
     "$ref": "#/definitions/SerdeInfo"
    },
    "SkewedInfo": {
     "$ref": "#/definitions/SkewedInfo"
    },
    "SortColumns": {
     "items": {
      "$ref": "#/definitions/Order"
     },
     "type": "array",
     "uniqueItems": false
    },
    "StoredAsSubDirectories": {
     "type": "boolean"
    }
   },
   "type": "object"
  },
  "TableIdentifier": {
   "additionalProperties": false,
   "properties": {
    "CatalogId": {
     "type": "string"
    },
    "DatabaseName": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    },
    "Region": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "TableInput": {
   "additionalProperties": false,
   "properties": {
    "Description": {
     "type": "string"
    },
    "Name": {
     "type": "string"
    },
    "Owner": {
     "type": "string"
    },
    "Parameters": {
     "format": "json",
     "type": [
      "object",
      "string"
     ]
    },
    "PartitionKeys": {
     "items": {
      "$ref": "#/definitions/Column"
     },
     "type": "array",
     "uniqueItems": false
    },
    "Retention": {
     "type": "integer"
    },
    "StorageDescriptor": {
     "$ref": "#/definitions/StorageDescriptor"
    },
    "TableType": {
     "enum": [
      "EXTERNAL_TABLE",
      "VIRTUAL_VIEW"
     ],
     "type": "string"
    },
    "TargetTable": {
     "$ref": "#/definitions/TableIdentifier"
    },
    "ViewDefinition": {
     "$ref": "#/definitions/ViewDefinition"
    },
    "ViewExpandedText": {
     "type": "string"
    },
    "ViewOriginalText": {
     "type": "string"
    }
   },
   "type": "object"
  },
  "ViewDefinition": {
   "additionalProperties": false,
   "properties": {
    "Definer": {
     "type": "string"
    },
    "IsProtected": {
     "type": "boolean"
    },
    "Representations": {
     "items": {
      "$ref": "#/definitions/ViewRepresentation"
     },
     "type": "array",
     "uniqueItems": false
    },
    "SubObjects": {
     "items": {
      "type": "string"
     },
     "type": "array",
     "uniqueItems": false
    }
   },
   "type": "object"
  },
  "ViewRepresentation": {
   "additionalProperties": false,
   "properties": {
    "Dialect": {
     "type": "string"
    },
    "DialectVersion": {
     "type": "string"
    },
    "ValidationConnection": {
     "type": "string"
    },
    "ViewExpandedText": {
     "type": "string"
    },
    "ViewOriginalText": {
     "type": "string"
    }
   },
   "type": "object"
  }
 },
 "primaryIdentifier": [
  "/properties/Id"
 ],
 "properties": {
  "CatalogId": {
   "type": "string"
  },
  "DatabaseName": {
   "type": "string"
  },
  "Id": {
   "type": "string"
  },
  "Name": {
   "type": "string"
  },
  "OpenTableFormatInput": {
   "$ref": "#/definitions/OpenTableFormatInput"
  },
  "TableInput": {
   "$ref": "#/definitions/TableInput"
  }
 },
 "readOnlyProperties": [
  "/properties/Id"
 ],
 "required": [
  "DatabaseName",
  "CatalogId"
 ],
 "typeName": "AWS::Glue::Table"
}
