{
  "oneOf": [
    {
      "type": "object",
      "required": [
        "repository_id"
      ],
      "properties": {
        "repository_id": {
          "description": "Repository id for this codespace",
          "type": "integer"
        },
        "ref": {
          "description": "Git ref (typically a branch name) for this codespace",
          "type": "string"
        },
        "location": {
          "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.",
          "type": "string"
        },
        "geo": {
          "description": "The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down.",
          "type": "string",
          "enum": [
            "EuropeWest",
            "SoutheastAsia",
            "UsEast",
            "UsWest"
          ]
        },
        "client_ip": {
          "description": "IP for location auto-detection when proxying a request",
          "type": "string"
        },
        "machine": {
          "description": "Machine type to use for this codespace",
          "type": "string"
        },
        "devcontainer_path": {
          "description": "Path to devcontainer.json config to use for this codespace",
          "type": "string"
        },
        "multi_repo_permissions_opt_out": {
          "description": "Whether to authorize requested permissions from devcontainer.json",
          "type": "boolean"
        },
        "working_directory": {
          "description": "Working directory for this codespace",
          "type": "string"
        },
        "idle_timeout_minutes": {
          "description": "Time in minutes before codespace stops from inactivity",
          "type": "integer"
        },
        "display_name": {
          "description": "Display name for this codespace",
          "type": "string"
        },
        "retention_period_minutes": {
          "description": "Duration in minutes after codespace has gone idle in which it will be deleted. Must be integer minutes between 0 and 43200 (30 days).",
          "type": "integer"
        }
      }
    },
    {
      "type": "object",
      "required": [
        "pull_request"
      ],
      "properties": {
        "pull_request": {
          "required": [
            "pull_request_number",
            "repository_id"
          ],
          "description": "Pull request number for this codespace",
          "type": "object",
          "properties": {
            "pull_request_number": {
              "description": "Pull request number",
              "type": "integer"
            },
            "repository_id": {
              "description": "Repository id for this codespace",
              "type": "integer"
            }
          }
        },
        "location": {
          "description": "The requested location for a new codespace. Best efforts are made to respect this upon creation. Assigned by IP if not provided.",
          "type": "string"
        },
        "geo": {
          "description": "The geographic area for this codespace. If not specified, the value is assigned by IP. This property replaces `location`, which is closing down.",
          "type": "string",
          "enum": [
            "EuropeWest",
            "SoutheastAsia",
            "UsEast",
            "UsWest"
          ]
        },
        "machine": {
          "description": "Machine type to use for this codespace",
          "type": "string"
        },
        "devcontainer_path": {
          "description": "Path to devcontainer.json config to use for this codespace",
          "type": "string"
        },
        "working_directory": {
          "description": "Working directory for this codespace",
          "type": "string"
        },
        "idle_timeout_minutes": {
          "description": "Time in minutes before codespace stops from inactivity",
          "type": "integer"
        }
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2019-09/schema"
}