bayesline.api.DeleteResult

Contents

bayesline.api.DeleteResult#

pydantic model bayesline.api.DeleteResult#

The result of a batch delete operation.

Show JSON schema
{
   "title": "DeleteResult",
   "description": "The result of a batch delete operation.",
   "type": "object",
   "properties": {
      "operation": {
         "description": "The operation that was performed, e.g. 'delete', 'permission', etc.",
         "title": "Operation",
         "type": "string"
      },
      "items": {
         "description": "Results of the operations for each settings object in the order they were provided.",
         "items": {
            "$ref": "#/$defs/DeleteItemResult"
         },
         "title": "Items",
         "type": "array"
      }
   },
   "$defs": {
      "DeleteItemResult": {
         "additionalProperties": false,
         "description": "The result of a single delete operation.",
         "properties": {
            "name_or_id": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "integer"
                  }
               ],
               "description": "The name or identifier of the item as it was provided to the operation.",
               "title": "Name Or Id"
            },
            "status": {
               "$ref": "#/$defs/ItemStatus",
               "description": "The status of the item operation."
            },
            "message": {
               "default": "",
               "description": "The human readable message of the item's operation result.",
               "title": "Message",
               "type": "string"
            },
            "name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The name of the item if available. Will always be available if the operation was successful.",
               "title": "Name"
            },
            "id": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "description": "The identifier of the item if available. Will always be available if the operation was successful.",
               "title": "Id"
            },
            "short_message": {
               "default": "",
               "description": "A short message of the item's operation result which can be used for summary messages. E.g. if a user could not be found, the short message should be the input of the user that could not be found.",
               "title": "Short Message",
               "type": "string"
            }
         },
         "required": [
            "name_or_id",
            "status",
            "name",
            "id"
         ],
         "title": "DeleteItemResult",
         "type": "object"
      },
      "ItemStatus": {
         "description": "The status of a single item operation, e.g. delete on a single settings object.",
         "enum": [
            "not_found",
            "invalid_type",
            "forbidden",
            "user_not_found",
            "group_not_found",
            "invalid",
            "conflict",
            "success"
         ],
         "title": "ItemStatus",
         "type": "string"
      }
   },
   "additionalProperties": false,
   "required": [
      "operation",
      "items"
   ]
}

Config:
  • extra: str = forbid

  • frozen: bool = True

Fields: