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

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

package promcrd

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

var ScrapeconfigsMonitoringCoreosComCRD = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.11.1"},
		Name:        "scrapeconfigs.monitoring.coreos.com",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Group: "monitoring.coreos.com",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Categories: []string{"prometheus-operator"},
			Kind:       "ScrapeConfig",
			ListKind:   "ScrapeConfigList",
			Plural:     "scrapeconfigs",
			ShortNames: []string{"scfg"},
			Singular:   "scrapeconfig",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{{
			Name: "v1alpha1",
			Schema: &apiextensionsv1.CustomResourceValidation{OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
				Description: "ScrapeConfig defines a namespaced Prometheus scrape_config to be aggregated across multiple namespaces into the Prometheus configuration.",
				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: "ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration.",
						Properties: map[string]apiextensionsv1.JSONSchemaProps{
							"fileSDConfigs": {
								Description: "FileSDConfigs defines a list of file service discovery configurations.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "FileSDConfig defines a Prometheus file service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"files": {
											Description: "List of files to be used for file discovery. Recommendation: use absolute paths. While relative paths work, the prometheus-operator project makes no guarantees about the working directory where the configuration file is stored. Files must be mounted using Prometheus.ConfigMaps or Prometheus.Secrets.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "SDFile represents a file used for service discovery",
												Pattern:     "^[^*]*(\\*[^/]*)?\\.(json|yml|yaml|JSON|YML|YAML)$",
												Type:        "string",
											}},
											MinItems: P(int64(1)),
											Type:     "array",
										},
										"refreshInterval": {
											Description: "RefreshInterval configures the refresh interval at which Prometheus will reload the content of the files.",
											Pattern:     "^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$",
											Type:        "string",
										},
									},
									Required: []string{"files"},
									Type:     "object",
								}},
								Type: "array",
							},
							"honorLabels": {
								Description: "HonorLabels chooses the metric's labels on collisions with target labels.",
								Type:        "boolean",
							},
							"honorTimestamps": {
								Description: "HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.",
								Type:        "boolean",
							},
							"httpSDConfigs": {
								Description: "HTTPSDConfigs defines a list of HTTP service discovery configurations.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "HTTPSDConfig defines a prometheus HTTP service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"refreshInterval": {
											Description: "RefreshInterval configures the refresh interval at which Prometheus will re-query the endpoint to update the target list.",
											Pattern:     "^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$",
											Type:        "string",
										},
										"url": {
											Description: "URL from which the targets are fetched.",
											MinLength:   P(int64(1)),
											Pattern:     "^http(s)?://.+$",
											Type:        "string",
										},
									},
									Required: []string{"url"},
									Type:     "object",
								}},
								Type: "array",
							},
							"metricsPath": {
								Description: "MetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics).",
								Type:        "string",
							},
							"relabelings": {
								Description: "RelabelConfigs defines how to rewrite the target's labels before scraping. Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. The original scrape job's name is available via the `__tmp_prometheus_job_name` label. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "RelabelConfig allows dynamic rewriting of the label set, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of Prometheus configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"action": {
											Default:     &apiextensionsv1.JSON{Raw: []byte("\"replace\"")},
											Description: "Action to perform based on regex matching. Default is 'replace'. uppercase and lowercase actions require Prometheus >= 2.36.",
											Enum:        []apiextensionsv1.JSON{{Raw: []byte("\"replace\"")}, {Raw: []byte("\"Replace\"")}, {Raw: []byte("\"keep\"")}, {Raw: []byte("\"Keep\"")}, {Raw: []byte("\"drop\"")}, {Raw: []byte("\"Drop\"")}, {Raw: []byte("\"hashmod\"")}, {Raw: []byte("\"HashMod\"")}, {Raw: []byte("\"labelmap\"")}, {Raw: []byte("\"LabelMap\"")}, {Raw: []byte("\"labeldrop\"")}, {Raw: []byte("\"LabelDrop\"")}, {Raw: []byte("\"labelkeep\"")}, {Raw: []byte("\"LabelKeep\"")}, {Raw: []byte("\"lowercase\"")}, {Raw: []byte("\"Lowercase\"")}, {Raw: []byte("\"uppercase\"")}, {Raw: []byte("\"Uppercase\"")}, {Raw: []byte("\"keepequal\"")}, {Raw: []byte("\"KeepEqual\"")}, {Raw: []byte("\"dropequal\"")}, {Raw: []byte("\"DropEqual\"")}},
											Type:        "string",
										},
										"modulus": {
											Description: "Modulus to take of the hash of the source label values.",
											Format:      "int64",
											Type:        "integer",
										},
										"regex": {
											Description: "Regular expression against which the extracted value is matched. Default is '(.*)'",
											Type:        "string",
										},
										"replacement": {
											Description: "Replacement value against which a regex replace is performed if the regular expression matches. Regex capture groups are available. Default is '$1'",
											Type:        "string",
										},
										"separator": {
											Description: "Separator placed between concatenated source label values. default is ';'.",
											Type:        "string",
										},
										"sourceLabels": {
											Description: "The source labels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the replace, keep, and drop actions.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores.",
												Pattern:     "^[a-zA-Z_][a-zA-Z0-9_]*$",
												Type:        "string",
											}},
											Type: "array",
										},
										"targetLabel": {
											Description: "Label to which the resulting value is written in a replace action. It is mandatory for replace actions. Regex capture groups are available.",
											Type:        "string",
										},
									},
									Type: "object",
								}},
								Type: "array",
							},
							"staticConfigs": {
								Description: "StaticConfigs defines a list of static targets with a common label set.",
								Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
									Description: "StaticConfig defines a Prometheus static configuration. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config",
									Properties: map[string]apiextensionsv1.JSONSchemaProps{
										"labels": {
											AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
												Allows: true,
												Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
											},
											Description: "Labels assigned to all metrics scraped from the targets.",
											Type:        "object",
											XMapType:    P("atomic"),
										},
										"targets": {
											Description: "List of targets for this static configuration.",
											Items: &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "Target represents a target for Prometheus to scrape",
												Type:        "string",
											}},
											Type: "array",
										},
									},
									Type: "object",
								}},
								Type: "array",
							},
						},
						Type: "object",
					},
				},
				Required: []string{"spec"},
				Type:     "object",
			}},
			Served:  true,
			Storage: true,
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
