{
    "title": "Filter To add Git credentials to a specific JOC account",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.publish.git.AddCredentialsFilter",
    "type": "object",
    "required": [
        "credentials"
    ],
    "properties": {
        "credentials": {
            "type": "array",
            "items": {
                "javaType": "com.sos.joc.model.publish.git.GitCredentials",
                "type": "object",
                "anyOf": [
                    {
                        "required": [
                            "gitAccount",
                            "username",
                            "email",
                            "password",
                            "gitServer"
                        ]
                    },
                    {
                        "required": [
                            "gitAccount",
                            "username",
                            "email",
                            "personalAccessToken",
                            "gitServer"
                        ]
                    },
                    {
                        "required": [
                            "gitAccount",
                            "username",
                            "email",
                            "keyfilePath",
                            "gitServer"
                        ]
                    }
                ],
                "properties": {
                    "gitAccount": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 100
                    },
                    "username": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 100
                    },
                    "email": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 100
                    },
                    "keyfilePath": {
                        "description": "path or filename of a private Key. Empty filename possible.",
                        "type": "string",
                        "maxLength": 255
                    },
                    "password": {
                        "type": "string"
                    },
                    "personalAccessToken": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 100
                    },
                    "gitServer": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                }
            }
        },
        "auditLog": {
            "javaType": "com.sos.joc.model.audit.AuditParams",
            "type": "object",
            "properties": {
                "comment": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                },
                "timeSpent": {
                    "type": "integer",
                    "minimum": 0
                },
                "ticketLink": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255
                }
            }
        }
    }
}