{
  "description": "Notification defines notification settings in Gravitee",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.",
      "type": "string"
    },
    "kind": {
      "description": "Kind is a string value representing the REST resource this object represents.",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "NotificationSpec defines the desired state of a Notification.\nIt is to be referenced in an API.",
      "properties": {
        "console": {
          "default": {},
          "description": "Console is used when the target value is \"console\" and is meant\nto configure Gravitee console UI...",
          "properties": {
            "apiEvents": {
              "description": "List events that will trigger a notification for an API.",
              "items": {
                "description": "ApiEvent defines the events that can be sent to the console.",
                "enum": [
                  "APIKEY_EXPIRED",
                  "APIKEY_RENEWED",
                  "APIKEY_REVOKED",
                  "SUBSCRIPTION_NEW",
                  "SUBSCRIPTION_ACCEPTED",
                  "SUBSCRIPTION_CLOSED",
                  "SUBSCRIPTION_PAUSED",
                  "SUBSCRIPTION_RESUMED",
                  "SUBSCRIPTION_REJECTED",
                  "SUBSCRIPTION_TRANSFERRED",
                  "SUBSCRIPTION_FAILED",
                  "NEW_SUPPORT_TICKET",
                  "API_STARTED",
                  "API_STOPPED",
                  "API_UPDATED",
                  "API_DEPLOYED",
                  "NEW_RATING",
                  "NEW_RATING_ANSWER",
                  "MESSAGE",
                  "ASK_FOR_REVIEW",
                  "REVIEW_OK",
                  "REQUEST_FOR_CHANGES",
                  "API_DEPRECATED",
                  "NEW_SPEC_GENERATED"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "groupRefs": {
              "description": "List of group references associated with this console notification.",
              "items": {
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "namespace": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            },
            "groups": {
              "description": "List of groups associated with the API.\nThese groups are id to existing groups in APIM.",
              "items": {
                "type": "string"
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "eventType": {
          "default": "api",
          "description": "EventType defines the subject of those events.",
          "enum": [
            "api"
          ],
          "type": "string"
        },
        "target": {
          "default": "console",
          "description": "Target of the notification: \"console\" is for notifications in Gravitee console UI.",
          "enum": [
            "console"
          ],
          "type": "string"
        }
      },
      "required": [
        "eventType",
        "target"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "NotificationStatus defines the observed state of the Notification.",
      "properties": {
        "conditions": {
          "default": [],
          "description": "Conditions are the condition that must be met by the Notification\n\"Accepted\" condition is used to...",
          "items": {
            "description": "Condition contains details for one aspect of the current state of this API Resource.",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        }
      },
      "required": [
        "conditions"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
