// Copyright (c) 2023 Volvo Car Corporation
// SPDX-License-Identifier: Apache-2.0

// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package vmcrd

import (
	apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var VmrulesOperatorVictoriametricsComCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.10.0"},
		Name:        "vmrules.operator.victoriametrics.com",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "operator.victoriametrics.com",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Kind:     "VMRule",
			ListKind: "VMRuleList",
			Plural:   "vmrules",
			Singular: "vmrule",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{{
			Name: "v1beta1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "VMRule defines rule records for vmalert application",
				Properties: map[string]apiextensionsv1.JSONSchemaProps{
					"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: "VMRuleSpec defines the desired state of VMRule",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{"groups": {
							Description: "Groups list of group rules",
							Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
								Description: "RuleGroup is a list of sequentially evaluated recording and alerting rules.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"concurrency": {
										Description: "Concurrency defines how many rules execute at once.",
										Type:        "integer",
									},
									"extra_filter_labels": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: "ExtraFilterLabels optional list of label filters applied to every rule's request withing a group. Is compatible only with VM datasource. See more details at https://docs.victoriametrics.com#prometheus-querying-api-enhancements Deprecated, use params instead",
										Type:        "object",
									},
									"headers": {
										Description: "Headers contains optional HTTP headers added to each rule request Must be in form `header-name: value` For example: headers: - \"CustomHeader: foo\" - \"CustomHeader2: bar\"",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"interval": {
										Description: "evaluation interval for group",
										Type:        "string",
									},
									"labels": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
										},
										Description: "Labels optional list of labels added to every rule within a group. It has priority over the external labels. Labels are commonly used for adding environment or tenant-specific tag.",
										Type:        "object",
									},
									"limit": {
										Description: "Limit the number of alerts an alerting rule and series a recording rule can produce",
										Type:        "integer",
									},
									"name": {
										Description: "Name of group",
										Type:        "string",
									},
									"notifier_headers": {
										Description: "NotifierHeaders contains optional HTTP headers added to each alert request which will send to notifier Must be in form `header-name: value` For example: headers: - \"CustomHeader: foo\" - \"CustomHeader2: bar\"",
										Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
										Type:        "array",
									},
									"params": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{
												Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
												Type:  "array",
											},
										},
										Description: "Params optional HTTP URL parameters added to each rule request",
										Type:        "object",
									},
									"rules": {
										Description: "Rules list of alert rules",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
											Description: "Rule describes an alerting or recording rule.",
											Properties: map[string]apiextensionsv1.JSONSchemaProps{
												"alert": {
													Description: "Alert is a name for alert",
													Type:        "string",
												},
												"annotations": {
													AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
														Allows: true,
														Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
													},
													Description: "Annotations will be added to rule configuration",
													Type:        "object",
												},
												"debug": {
													Description: "Debug enables logging for rule it useful for tracking",
													Type:        "boolean",
												},
												"expr": {
													Description: "Expr is query, that will be evaluated at dataSource",
													Type:        "string",
												},
												"for": {
													Description: "For evaluation interval in time.Duration format 30s, 1m, 1h  or nanoseconds",
													Type:        "string",
												},
												"labels": {
													AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
														Allows: true,
														Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
													},
													Description: "Labels will be added to rule configuration",
													Type:        "object",
												},
												"record": {
													Description: "Record represents a query, that will be recorded to dataSource",
													Type:        "string",
												},
											},
											Type: "object",
										}},
										Type: "array",
									},
									"tenant": {
										Description: "Tenant id for group, can be used only with enterprise version of vmalert See more details at https://docs.victoriametrics.com/vmalert.html#multitenancy",
										Type:        "string",
									},
									"type": {
										Description: "Type defines datasource type for enterprise version of vmalert possible values - prometheus,graphite",
										Type:        "string",
									},
								},
								Required: []string{"name", "rules"},
								Type:     "object",
							}},
							Type: "array",
						}},
						Required: []string{"groups"},
						Type:     "object",
					},
					"status": {
						Description: "VMRuleStatus defines the observed state of VMRule",
						Type:        "object",
					},
				},
				Required: []string{"spec"},
				Type:     "object",
			}},
			Served:       true,
			Storage:      true,
			Subresources: &apiextensionsv1.CustomResourceSubresources{},
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
