{
  "description": "AlertProvider is the Schema for the AlertProvider API.",
  "type": "object",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "AlertProviderSpec defines the desired state of a AlertProvider.",
      "type": "object",
      "oneOf": [
        {
          "required": [
            "type",
            "address"
          ]
        },
        {
          "required": [
            "type",
            "secretRef"
          ]
        }
      ],
      "properties": {
        "type": {
          "description": "Type of this provider",
          "type": "string",
          "enum": [
            "slack",
            "msteams",
            "discord",
            "rocket",
            "gchat"
          ]
        },
        "channel": {
          "description": "Alert channel for this provider",
          "type": "string"
        },
        "username": {
          "description": "Bot username for this provider",
          "type": "string"
        },
        "address": {
          "description": "Hook URL address of this provider",
          "type": "string"
        },
        "proxy": {
          "description": "Http/s proxy of this provider",
          "type": "string"
        },
        "secretRef": {
          "description": "Kubernetes secret reference containing the provider address",
          "type": "object",
          "required": [
            "name"
          ],
          "properties": {
            "name": {
              "description": "Name of the Kubernetes secret",
              "type": "string"
            }
          },
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    }
  }
}
