{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cloudtruth/json-schema/cloudtruth-patched-grant-update-schema.json",
  "title": "PatchedGrantUpdate",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cloudtruth-grants-api-openapi.yml#/components/schemas/PatchedGrantUpdate",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "readOnly": true
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "readOnly": true,
      "description": "A unique identifier for the grant."
    },
    "principal": {
      "type": "string",
      "format": "uri",
      "description": "The URI of a principal for the grant; this must reference a user or group."
    },
    "scope": {
      "type": "string",
      "format": "uri",
      "description": "The URI of a scope for the grant; this must reference a project or environment."
    },
    "role": {
      "allOf": [
        {
          "$ref": "#/$defs/RoleEnum"
        }
      ],
      "description": "The role that the principal has in the given scope.\n\n* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "modified_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "readOnly": true
    }
  },
  "$defs": {
    "RoleEnum": {
      "enum": [
        "OWNER",
        "ADMIN",
        "CONTRIB",
        "VIEWER",
        "NO_SECRETS"
      ],
      "type": "string",
      "description": "* `OWNER` - Owner\n* `ADMIN` - Administrator\n* `CONTRIB` - Contributor\n* `VIEWER` - Viewer\n* `NO_SECRETS` - NoSecretsViewer"
    }
  }
}