{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/safetyculture/json-schema/safetyculture-s12-userdocuments-v1-update-document-type-request-schema.json",
  "title": "s12.userdocuments.v1.UpdateDocumentTypeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/safetyculture-credentials-api-openapi.yml#/components/schemas/s12.userdocuments.v1.UpdateDocumentTypeRequest",
  "type": "object",
  "properties": {
    "update_mask": {
      "type": "string",
      "description": "The attributes (such as name etc.) you want to update for the type,\nspecified in the parameters. For example, the update_mask=name parameter\nindicates that only the name will be updated in a request, any other\nattributes provided in your request body will be ignored."
    },
    "document_type": {
      "description": "Type which replaces the one with matching identifier on the server.",
      "allOf": [
        {
          "$ref": "#/$defs/s12.typefield.v1.Type"
        }
      ]
    }
  },
  "$defs": {
    "s12.typefield.v1.Domain": {
      "type": "string",
      "enum": [
        "DOMAIN_UNSPECIFIED",
        "DOMAIN_GLOBAL",
        "DOMAIN_ASSETS",
        "DOMAIN_CONTRACTORS",
        "DOMAIN_LICENSES_AND_CREDENTIALS",
        "DOMAIN_TASKS",
        "DOMAIN_USERS",
        "DOMAIN_INVESTIGATIONS",
        "DOMAIN_STRUCTURES",
        "DOMAIN_INTEGRATIONS_HRIS_STAGING"
      ],
      "default": "DOMAIN_UNSPECIFIED",
      "description": "The domain is used to specify which domain the data is coming from.\nThis allows the shared generic type field service to keep track of which domain owns the data,\nand enforce any domain-specific access control rules.\n\n - DOMAIN_UNSPECIFIED: Domain Unspecified.\n - DOMAIN_GLOBAL: Owned and managed by system can be used by multiple domains\n - DOMAIN_ASSETS: Owned and created from Assets domain\n - DOMAIN_CONTRACTORS: Owned and created from Contractor Management domain\n - DOMAIN_LICENSES_AND_CREDENTIALS: Owned and created from the Licenses and Credentials domain\n - DOMAIN_TASKS: Owned and created from the Tasks domain\n - DOMAIN_USERS: Owned and created from the Users domain\n - DOMAIN_INVESTIGATIONS: Owned and created from the Investigations domain\n - DOMAIN_STRUCTURES: Owned and created from the Organisational Structures domain\n - DOMAIN_INTEGRATIONS_HRIS_STAGING: Owned and created from the Integrations domain"
    },
    "s12.typefield.v1.Type": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "A global unique identifier for a type."
        },
        "name": {
          "type": "string",
          "description": "Name of the type."
        },
        "description": {
          "type": "string",
          "description": "Description of the type."
        },
        "type_category": {
          "description": "Type category. Cannot be updated.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/$defs/s12.typefield.v1.TypeCategory"
            }
          ]
        },
        "domain": {
          "description": "The domain of type. Cannot be updated.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/$defs/s12.typefield.v1.Domain"
            }
          ]
        },
        "stats": {
          "description": "Additional stats associated with a type.",
          "readOnly": true,
          "allOf": [
            {
              "$ref": "#/$defs/s12.typefield.v1.TypeStats"
            }
          ]
        }
      },
      "description": "Describes the values of a type."
    },
    "s12.typefield.v1.TypeCategory": {
      "type": "string",
      "enum": [
        "TYPE_CATEGORY_UNSPECIFIED",
        "TYPE_CATEGORY_SYSTEM",
        "TYPE_CATEGORY_CUSTOM"
      ],
      "default": "TYPE_CATEGORY_UNSPECIFIED",
      "description": "- TYPE_CATEGORY_UNSPECIFIED: Type Unspecified.\n - TYPE_CATEGORY_SYSTEM: Type pre-defined.\n - TYPE_CATEGORY_CUSTOM: Type custom.",
      "title": "TypeCategory defines if it's system or user created type"
    },
    "s12.typefield.v1.TypeStats": {
      "type": "object",
      "properties": {
        "mapping_count": {
          "type": "integer",
          "format": "int32",
          "description": "The total number of mappings associated with a type."
        }
      },
      "description": "Stats associated with a type."
    }
  }
}