{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "environment_name": {
          "type": "string",
          "description": "The name of the environment to approve or reject."
        },
        "comment": {
          "type": "string",
          "description": "Comment associated with the pending deployment protection rule. **Required when state is not provided.**"
        }
      },
      "required": [
        "environment_name",
        "comment"
      ]
    },
    {
      "type": "object",
      "properties": {
        "environment_name": {
          "type": "string",
          "description": "The name of the environment to approve or reject."
        },
        "state": {
          "type": "string",
          "description": "Whether to approve or reject deployment to the specified environments.",
          "enum": [
            "approved",
            "rejected"
          ]
        },
        "comment": {
          "type": "string",
          "description": "Optional comment to include with the review."
        }
      },
      "required": [
        "environment_name",
        "state"
      ]
    }
  ],
  "$schema": "https://json-schema.org/draft/2019-09/schema"
}