{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$comment": "Generated from Open Platform Owner CustomerUserContext; DO NOT EDIT.",
  "x-source-sha256": "a04678f07a1cb0da0494232985585ed8b94e07e8cd010728d6110df4ea2861bf",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "application_id",
    "environment",
    "user",
    "space",
    "resolved_at",
    "expires_at"
  ],
  "properties": {
    "application_id": {
      "type": "string"
    },
    "environment": {
      "type": "string",
      "enum": [
        "sandbox",
        "production"
      ]
    },
    "user": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "open_id",
        "union_id"
      ],
      "properties": {
        "open_id": {
          "type": "string",
          "pattern": "^open_[A-Za-z0-9_-]{43}$"
        },
        "union_id": {
          "type": "string",
          "pattern": "^union_[A-Za-z0-9_-]{43}$"
        }
      }
    },
    "space": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "organization_id",
        "membership_id",
        "display_name",
        "kind"
      ],
      "properties": {
        "organization_id": {
          "type": "string",
          "format": "uuid"
        },
        "membership_id": {
          "type": "string",
          "format": "uuid"
        },
        "display_name": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "personal",
            "selected"
          ],
          "description": "selected describes explicit selection and does not classify an organization as a team"
        }
      }
    },
    "resolved_at": {
      "type": "string",
      "format": "date-time"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time"
    }
  }
}
