{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-iot-fleetwise/json-schema/amazon-iot-fleetwise-update-vehicle-request-schema.json",
  "title": "UpdateVehicleRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-iot-fleetwise-aws-iot-fleetwise-api-openapi.yml#/components/schemas/UpdateVehicleRequest",
  "type": "object",
  "properties": {
    "vehicleName": {
      "type": "string",
      "description": "The unique ID of the vehicle to update."
    },
    "modelManifestArn": {
      "type": "string",
      "description": "The ARN of a vehicle model (model manifest) associated with the vehicle."
    },
    "decoderManifestArn": {
      "type": "string",
      "description": "The ARN of the decoder manifest associated with this vehicle."
    },
    "attributes": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Static information about a vehicle in a key-value pair. For example: \"engineType\" : \"1.3 L R2\""
    },
    "attributeUpdateMode": {
      "type": "string",
      "enum": [
        "Overwrite",
        "Merge"
      ],
      "description": "The method the specified attributes will update the existing attributes on the vehicle. UseOverwite to replace the vehicle attributes with the specified attributes. Or use Merge to combine all attributes. This is required if attributes are present in the input."
    },
    "stateTemplatesToAdd": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StateTemplateAssociation"
      },
      "description": "Associate state templates with the vehicle."
    },
    "stateTemplatesToRemove": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Remove state templates from the vehicle."
    },
    "stateTemplatesToUpdate": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/StateTemplateAssociation"
      },
      "description": "Change the stateTemplateUpdateStrategy of state templates already associated with the vehicle."
    }
  },
  "required": [
    "vehicleName"
  ],
  "$defs": {
    "OnChangeStateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {}
    },
    "PeriodicStateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {
        "stateTemplateUpdateRate": {
          "$ref": "#/$defs/TimePeriod"
        }
      },
      "required": [
        "stateTemplateUpdateRate"
      ]
    },
    "StateTemplateAssociation": {
      "type": "object",
      "properties": {
        "identifier": {
          "type": "string",
          "description": "The unique ID of the state template."
        },
        "stateTemplateUpdateStrategy": {
          "$ref": "#/$defs/StateTemplateUpdateStrategy"
        }
      },
      "required": [
        "identifier",
        "stateTemplateUpdateStrategy"
      ]
    },
    "StateTemplateUpdateStrategy": {
      "type": "object",
      "properties": {
        "periodic": {
          "$ref": "#/$defs/PeriodicStateTemplateUpdateStrategy"
        },
        "onChange": {
          "$ref": "#/$defs/OnChangeStateTemplateUpdateStrategy"
        }
      },
      "description": "Exactly one member is set."
    },
    "TimePeriod": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "enum": [
            "MILLISECOND",
            "SECOND",
            "MINUTE",
            "HOUR"
          ],
          "description": "A unit of time."
        },
        "value": {
          "type": "integer",
          "description": "A number of time units."
        }
      },
      "required": [
        "unit",
        "value"
      ]
    }
  }
}