{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trimble/json-schema/trimble-data-security-groups-with-keys-schema.json",
  "title": "data_security_groups_withKeys",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trimble-vista-va-openapi.yml#/components/schemas/data_security_groups_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_security_groups"
    }
  ],
  "$defs": {
    "data_security_groups": {
      "required": [
        "SecurityGroup",
        "GroupType",
        "KeyID"
      ],
      "type": "object",
      "properties": {
        "SecurityGroup": {
          "type": "integer",
          "description": "The unique identifier for the Security Group (Primary Key Component)"
        },
        "Name": {
          "maxLength": 30,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "GroupType": {
          "enum": [
            0,
            1,
            2,
            3
          ],
          "type": "integer",
          "description": "Type of Security Group. Options: 0-Data, 1-Program, 2-Reports, 3-Attachment Type."
        },
        "Description": {
          "maxLength": 256,
          "type": [
            "string",
            "null"
          ],
          "description": ""
        },
        "KeyID": {
          "type": "integer",
          "description": "Record Identifier (Internal Primary Key)"
        },
        "Users": {
          "type": "array",
          "items": {
            "required": [
              "SecurityGroup",
              "VPUserName",
              "KeyID"
            ],
            "type": "object",
            "properties": {
              "SecurityGroup": {
                "type": "integer",
                "description": "Parent Security Group ID (Primary Key Component)"
              },
              "VPUserName": {
                "maxLength": 128,
                "type": "string",
                "description": "The user's Virtual Payroll (VP) username (Primary Key Component)"
              },
              "KeyID": {
                "type": "integer",
                "description": "Record Identifier (Internal Primary Key)"
              },
              "__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."
              }
            }
          },
          "description": "Users assigned to this Security Group."
        },
        "__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."
        }
      },
      "description": "Data Dictionary Security Group (DDSG) Cache Schema, including associated users."
    }
  }
}