{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/amazon-connect/json-schema/amazon-connect-create-test-case-request-schema.json",
  "title": "CreateTestCaseRequest",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/amazon-connect-test-cases-api-openapi.yml#/components/schemas/CreateTestCaseRequest",
  "type": "object",
  "properties": {
    "InstanceId": {
      "type": "string",
      "description": "The identifier of the Amazon Connect instance."
    },
    "Name": {
      "type": "string",
      "description": "The name of the test."
    },
    "Description": {
      "type": "string",
      "description": "The description of the test."
    },
    "Content": {
      "type": "string",
      "description": "The JSON string that represents the content of the test."
    },
    "EntryPoint": {
      "$ref": "#/$defs/TestCaseEntryPoint"
    },
    "InitializationData": {
      "type": "string",
      "description": "Defines the initial custom attributes for your test."
    },
    "Status": {
      "type": "string",
      "enum": [
        "PUBLISHED",
        "SAVED"
      ],
      "description": "Indicates the test status as either SAVED or PUBLISHED. The PUBLISHED status will initiate validation on the content. The SAVED status does not initiate validation of the content."
    },
    "TestCaseId": {
      "type": "string",
      "description": "Id of the test case if you want to create it in a replica region using Amazon Connect Global Resiliency"
    },
    "Tags": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The tags used to organize, track, or control access for this resource."
    },
    "LastModifiedTime": {
      "type": "string",
      "format": "date-time",
      "description": "The time at which the resource was last modified."
    },
    "LastModifiedRegion": {
      "type": "string",
      "description": "The region in which the resource was last modified"
    }
  },
  "required": [
    "InstanceId",
    "Name",
    "Content"
  ],
  "$defs": {
    "ChatEntryPointParameters": {
      "type": "object",
      "properties": {
        "FlowId": {
          "type": "string",
          "description": "The flow identifier for the test."
        }
      }
    },
    "TestCaseEntryPoint": {
      "type": "object",
      "properties": {
        "Type": {
          "type": "string",
          "enum": [
            "VOICE_CALL",
            "CHAT"
          ],
          "description": "The type of entry point."
        },
        "VoiceCallEntryPointParameters": {
          "$ref": "#/$defs/VoiceCallEntryPointParameters"
        },
        "ChatEntryPointParameters": {
          "$ref": "#/$defs/ChatEntryPointParameters"
        }
      }
    },
    "VoiceCallEntryPointParameters": {
      "type": "object",
      "properties": {
        "SourcePhoneNumber": {
          "type": "string",
          "description": "The source phone number for the test."
        },
        "DestinationPhoneNumber": {
          "type": "string",
          "description": "The destination phone number for the test."
        },
        "FlowId": {
          "type": "string",
          "description": "The flow identifier for the test."
        }
      }
    }
  }
}