{
  "description": "DatadogSLO allows a user to define and manage datadog SLOs from Kubernetes cluster.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "controllerOptions": {
          "description": "ControllerOptions are the optional parameters in the DatadogSLO controller",
          "properties": {
            "disableRequiredTags": {
              "description": "DisableRequiredTags disables the automatic addition of required tags to SLOs.",
              "type": "boolean"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "description": {
          "description": "Description is a user-defined description of the service level objective.\nAlways included in service level objective responses (but may be null). Optional in create/update requests.",
          "type": "string"
        },
        "groups": {
          "description": "Groups is a list of (up to 100) monitor groups that narrow the scope of a monitor service level objective.\nIncluded in service level objective responses if it is not empty.\nOptional in create/update requests for monitor service level objectives, but may only be used when the length of the monitor_ids field is one.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-kubernetes-list-type": "set"
        },
        "monitorIDs": {
          "description": "MonitorIDs is a list of monitor IDs that defines the scope of a monitor service level objective. Required if type is monitor.",
          "items": {
            "format": "int64",
            "type": "integer"
          },
          "type": "array",
          "x-kubernetes-list-type": "set"
        },
        "name": {
          "description": "Name is the name of the service level objective.",
          "type": "string"
        },
        "query": {
          "description": "Query is the query for a metric-based SLO. Required if type is metric.\nNote that only the `sum by` aggregator is allowed, which sums all request counts. `Average`, `max`, nor `min` request aggregators are not supported.",
          "properties": {
            "denominator": {
              "description": "Denominator is a Datadog metric query for total (valid) events.",
              "type": "string"
            },
            "numerator": {
              "description": "Numerator is a Datadog metric query for good events.",
              "type": "string"
            }
          },
          "required": [
            "denominator",
            "numerator"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "tags": {
          "description": "Tags is a list of tags to associate with your service level objective.\nThis can help you categorize and filter service level objectives in the service level objectives page of the UI.\nNote: it's not currently possible to filter by these tags when querying via the API.",
          "items": {
            "type": "string"
          },
          "type": "array",
          "x-kubernetes-list-type": "set"
        },
        "targetThreshold": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "TargetThreshold is the target threshold such that when the service level indicator is above this threshold over the given timeframe, the objective is being met.",
          "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
          "x-kubernetes-int-or-string": true
        },
        "timeframe": {
          "description": "The SLO time window options.",
          "type": "string"
        },
        "type": {
          "description": "Type is the type of the service level objective.",
          "type": "string"
        },
        "warningThreshold": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "string"
            }
          ],
          "description": "WarningThreshold is a optional warning threshold such that when the service level indicator is below this value for the given threshold, but above the target threshold, the objective appears in a \"warning\" state. This value must be greater than the target threshold.",
          "pattern": "^(\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\\+|-)?(([0-9]+(\\.[0-9]*)?)|(\\.[0-9]+))))?$",
          "x-kubernetes-int-or-string": true
        }
      },
      "required": [
        "name",
        "targetThreshold",
        "timeframe",
        "type"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DatadogSLOStatus defines the observed state of a DatadogSLO.",
      "properties": {
        "conditions": {
          "description": "Conditions represents the latest available observations of the state of a DatadogSLO.",
          "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.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "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",
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        },
        "created": {
          "description": "Created is the time the SLO was created.",
          "format": "date-time",
          "type": "string"
        },
        "creator": {
          "description": "Creator is the identity of the SLO creator.",
          "type": "string"
        },
        "currentHash": {
          "description": "CurrentHash tracks the hash of the current DatadogSLOSpec to know\nif the Spec has changed and needs an update.",
          "type": "string"
        },
        "id": {
          "description": "ID is the SLO ID generated in Datadog.",
          "type": "string"
        },
        "lastForceSyncTime": {
          "description": "LastForceSyncTime is the last time the API SLO was last force synced with the DatadogSLO resource.",
          "format": "date-time",
          "type": "string"
        },
        "syncStatus": {
          "description": "SyncStatus shows the health of syncing the SLO state to Datadog.",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
