{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-automation/json-schema/microsoft-azure-automation-source-control-schema.json",
  "title": "SourceControl",
  "description": "Definition of the source control.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-automation-source-control-api-openapi.yml#/components/schemas/SourceControl",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/SourceControlProperties",
      "description": "The properties of the source control.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/ProxyResource"
    }
  ],
  "$defs": {
    "ProxyResource": {
      "type": "object",
      "title": "Proxy Resource",
      "description": "The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location",
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "Resource": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    },
    "SourceControlProperties": {
      "type": "object",
      "description": "Definition of the source control properties",
      "properties": {
        "repoUrl": {
          "type": "string",
          "description": "The repo url of the source control."
        },
        "branch": {
          "type": "string",
          "description": "The repo branch of the source control. Include branch as empty string for VsoTfvc."
        },
        "folderPath": {
          "type": "string",
          "description": "The folder path of the source control."
        },
        "autoSync": {
          "type": "boolean",
          "description": "The auto sync of the source control. Default is false."
        },
        "publishRunbook": {
          "type": "boolean",
          "description": "The auto publish of the source control. Default is true."
        },
        "sourceType": {
          "$ref": "#/$defs/SourceType",
          "description": "The source type. Must be one of VsoGit, VsoTfvc, GitHub."
        },
        "description": {
          "type": "string",
          "description": "The description."
        },
        "creationTime": {
          "type": "string",
          "format": "date-time",
          "description": "The creation time."
        },
        "lastModifiedTime": {
          "type": "string",
          "format": "date-time",
          "description": "The last modified time."
        }
      }
    },
    "SourceType": {
      "type": "string",
      "description": "The source type. Must be one of VsoGit, VsoTfvc, GitHub.",
      "enum": [
        "VsoGit",
        "VsoTfvc",
        "GitHub"
      ],
      "x-ms-enum": {
        "name": "SourceType",
        "modelAsString": true,
        "values": [
          {
            "name": "VsoGit",
            "value": "VsoGit",
            "description": "VsoGit"
          },
          {
            "name": "VsoTfvc",
            "value": "VsoTfvc",
            "description": "VsoTfvc"
          },
          {
            "name": "GitHub",
            "value": "GitHub",
            "description": "GitHub"
          }
        ]
      }
    }
  }
}