{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-twinmaker/json-schema/amazon-iot-twinmaker-update-entity-request-schema.json",
  "title": "UpdateEntityRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-twinmaker-entities-api-openapi.yml#/components/schemas/UpdateEntityRequest",
  "type": "object",
  "properties": {
    "workspaceId": {
      "type": "string",
      "description": "The ID of the workspace that contains the entity."
    },
    "entityId": {
      "type": "string",
      "description": "The ID of the entity."
    },
    "entityName": {
      "type": "string",
      "description": "The name of the entity."
    },
    "description": {
      "type": "string",
      "description": "The description of the entity."
    },
    "componentUpdates": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/ComponentUpdateRequest"
      },
      "description": "An object that maps strings to the component updates in the request. Each string in the mapping must be unique to this object."
    },
    "compositeComponentUpdates": {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/$defs/CompositeComponentUpdateRequest"
      },
      "description": "This is an object that maps strings to compositeComponent updates in the request. Each key of the map represents the componentPath of the compositeComponent."
    },
    "parentEntityUpdate": {
      "$ref": "#/$defs/ParentEntityUpdateRequest"
    }
  },
  "required": [
    "workspaceId",
    "entityId"
  ],
  "$defs": {
    "ComponentPropertyGroupRequest": {
      "type": "object",
      "properties": {
        "groupType": {
          "type": "string",
          "description": "The group type."
        },
        "propertyNames": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The property names."
        },
        "updateType": {
          "type": "string",
          "description": "The update type."
        }
      }
    },
    "ComponentUpdateRequest": {
      "type": "object",
      "properties": {
        "updateType": {
          "type": "string",
          "description": "The update type of the component update request."
        },
        "description": {
          "type": "string",
          "description": "The description of the component type."
        },
        "componentTypeId": {
          "type": "string",
          "description": "The ID of the component type."
        },
        "propertyUpdates": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PropertyRequest"
          },
          "description": "An object that maps strings to the properties to set in the component type update. Each string in the mapping must be unique to this object."
        },
        "propertyGroupUpdates": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ComponentPropertyGroupRequest"
          },
          "description": "The property group updates."
        }
      }
    },
    "CompositeComponentUpdateRequest": {
      "type": "object",
      "properties": {
        "updateType": {
          "type": "string",
          "description": "The update type of the component update request."
        },
        "description": {
          "type": "string",
          "description": "The description of the component type."
        },
        "propertyUpdates": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/PropertyRequest"
          },
          "description": "An object that maps strings to the properties to set in the component type update. Each string in the mapping must be unique to this object."
        },
        "propertyGroupUpdates": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/ComponentPropertyGroupRequest"
          },
          "description": "The property group updates."
        }
      }
    },
    "DataType": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The underlying type of the data type."
        },
        "nestedType": {
          "$ref": "#/$defs/DataType"
        },
        "allowedValues": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DataValue"
          },
          "description": "The allowed values for this data type."
        },
        "unitOfMeasure": {
          "type": "string",
          "description": "The unit of measure used in this data type."
        },
        "relationship": {
          "$ref": "#/$defs/Relationship"
        }
      },
      "required": [
        "type"
      ]
    },
    "DataValue": {
      "type": "object",
      "properties": {
        "booleanValue": {
          "type": "boolean",
          "description": "A Boolean value."
        },
        "doubleValue": {
          "type": "number",
          "description": "A double value."
        },
        "integerValue": {
          "type": "integer",
          "description": "An integer value."
        },
        "longValue": {
          "type": "integer",
          "description": "A long value."
        },
        "stringValue": {
          "type": "string",
          "description": "A string value."
        },
        "listValue": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DataValue"
          },
          "description": "A list of multiple values."
        },
        "mapValue": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/DataValue"
          },
          "description": "An object that maps strings to multiple DataValue objects."
        },
        "relationshipValue": {
          "$ref": "#/$defs/RelationshipValue"
        },
        "expression": {
          "type": "string",
          "description": "An expression that produces the value."
        }
      }
    },
    "ParentEntityUpdateRequest": {
      "type": "object",
      "properties": {
        "updateType": {
          "type": "string",
          "description": "The type of the update."
        },
        "parentEntityId": {
          "type": "string",
          "description": "The ID of the parent entity."
        }
      },
      "required": [
        "updateType"
      ]
    },
    "PropertyDefinitionRequest": {
      "type": "object",
      "properties": {
        "dataType": {
          "$ref": "#/$defs/DataType"
        },
        "isRequiredInEntity": {
          "type": "boolean",
          "description": "A Boolean value that specifies whether the property is required."
        },
        "isExternalId": {
          "type": "boolean",
          "description": "A Boolean value that specifies whether the property ID comes from an external data store."
        },
        "isStoredExternally": {
          "type": "boolean",
          "description": "A Boolean value that specifies whether the property is stored externally."
        },
        "isTimeSeries": {
          "type": "boolean",
          "description": "A Boolean value that specifies whether the property consists of time series data."
        },
        "defaultValue": {
          "$ref": "#/$defs/DataValue"
        },
        "configuration": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          },
          "description": "A mapping that specifies configuration information about the property. Use this field to specify information that you read from and write to an external source."
        },
        "displayName": {
          "type": "string",
          "description": "A friendly name for the property."
        }
      }
    },
    "PropertyRequest": {
      "type": "object",
      "properties": {
        "definition": {
          "$ref": "#/$defs/PropertyDefinitionRequest"
        },
        "value": {
          "$ref": "#/$defs/DataValue"
        },
        "updateType": {
          "type": "string",
          "description": "The update type of the update property request."
        }
      }
    },
    "Relationship": {
      "type": "object",
      "properties": {
        "targetComponentTypeId": {
          "type": "string",
          "description": "The ID of the target component type associated with this relationship."
        },
        "relationshipType": {
          "type": "string",
          "description": "The type of the relationship."
        }
      }
    },
    "RelationshipValue": {
      "type": "object",
      "properties": {
        "targetEntityId": {
          "type": "string",
          "description": "The ID of the target entity associated with this relationship value."
        },
        "targetComponentName": {
          "type": "string",
          "description": "The name of the target component associated with the relationship value."
        }
      }
    }
  }
}