{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-attachment-options-with-keys-schema.json",
  "title": "data_attachment_options_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-dm-openapi.yml#/components/schemas/data_attachment_options_withKeys",
  "allOf": [
    {
      "type": "object",
      "properties": {
        "__ryvitKeys": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Array of key paths that can be used to retrieve this object."
        },
        "__modifiedUTC": {
          "type": "string",
          "description": "UTC timestamp of when this object was last modified in the cache."
        }
      }
    },
    {
      "$ref": "#/$defs/data_attachment_options"
    }
  ],
  "$defs": {
    "data_attachment_options": {
      "required": [
        "UseJPG",
        "UseStructForAttYN",
        "SaveToDatabase",
        "ScanningFileFormat",
        "CreateStandAloneOnDelete",
        "UseAuditing",
        "ArchiveDeletedAttachments",
        "PdfResolution",
        "UseViewpointViewer",
        "AttachmentDatabaseServer",
        "AttachmentDatabaseName"
      ],
      "type": "object",
      "properties": {
        "OnlyOneRow": {
          "enum": [
            "X"
          ],
          "type": "string",
          "description": "Always X"
        },
        "TempDirectory": {
          "maxLength": 255,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "PermanentDirectory": {
          "maxLength": 255,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ByCompany": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ByModule": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ByForm": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "ByMonth": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "Custom": {
          "enum": [
            "Y",
            "N",
            null
          ],
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "CustomFormat": {
          "maxLength": 100,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "UseJPG": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "UseStructForAttYN": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "SaveToDatabase": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": "Y = store attachment bytes in HQAF (AttachmentDatabaseServer/AttachmentDatabaseName). N = store on filesystem paths in HQAT.DocName; cache_file reads DocName when staging files out of Vista."
        },
        "ScanningFileFormat": {
          "maxLength": 30,
          "type": "string",
          "description": ""
        },
        "CreateStandAloneOnDelete": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "UseAuditing": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "ArchiveDeletedAttachments": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "PdfResolution": {
          "type": "integer",
          "description": ""
        },
        "UseViewpointViewer": {
          "enum": [
            "Y",
            "N"
          ],
          "type": "string",
          "description": ""
        },
        "AttachmentDatabaseServer": {
          "maxLength": 128,
          "type": "string",
          "description": "SQL server for the HQAF attachment database when SaveToDatabase=Y. Must match the Attachment Database Connection String on the Vista connection when a separate attachment DB is configured."
        },
        "AttachmentDatabaseName": {
          "maxLength": 128,
          "type": "string",
          "description": "Database name for HQAF when SaveToDatabase=Y. Must match the Attachment Database Connection String on the Vista connection when a separate attachment DB is configured."
        },
        "__custom_fields": {
          "type": "object",
          "description": "This property will be added if there are any custom fields defined for this object in Vista.  Each custom field will be a property of this object."
        }
      }
    }
  }
}