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

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

package crd

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

var PushsecretsCrd = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.11.1"},
		Name:        "pushsecrets.external-secrets.io",
	},
	Spec: apiextensionsv1.CustomResourceDefinitionSpec{
		Conversion: &apiextensionsv1.CustomResourceConversion{
			Strategy: apiextensionsv1.ConversionStrategyType("Webhook"),
			Webhook: &apiextensionsv1.WebhookConversion{
				ClientConfig: &apiextensionsv1.WebhookClientConfig{
					Service: &apiextensionsv1.ServiceReference{
						Name:      "external-secrets-webhook",
						Namespace: "external-secrets",
						Path:      P("/convert"),
					},
				},
				ConversionReviewVersions: []string{"v1"},
			},
		},
		Group: "external-secrets.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Categories: []string{"pushsecrets"},
			Kind:       "PushSecret",
			ListKind:   "PushSecretList",
			Plural:     "pushsecrets",
			Singular:   "pushsecret",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{
			{
				AdditionalPrinterColumns: []apiextensionsv1.CustomResourceColumnDefinition{
					{
						JSONPath: ".metadata.creationTimestamp",
						Name:     "AGE",
						Type:     "date",
					}, {
						JSONPath: ".status.conditions[?(@.type==\"Ready\")].reason",
						Name:     "Status",
						Type:     "string",
					},
				},
				Name: "v1alpha1",
				Schema: &apiextensionsv1.CustomResourceValidation{
					OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
						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: "PushSecretSpec configures the behavior of the PushSecret.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"data": {
										Description: "Secret Data that should be pushed to providers",
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{
											Schema: &apiextensionsv1.JSONSchemaProps{
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"match": {
														Description: "Match a given Secret Key to be pushed to the provider.",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"remoteRef": {
																Description: "Remote Refs to push to providers.",
																Properties: map[string]apiextensionsv1.JSONSchemaProps{
																	"remoteKey": {
																		Description: "Name of the resulting provider secret.",
																		Type:        "string",
																	},
																},
																Required: []string{"remoteKey"},
																Type:     "object",
															},
															"secretKey": {
																Description: "Secret Key to be pushed",
																Type:        "string",
															},
														},
														Required: []string{
															"remoteRef",
															"secretKey",
														},
														Type: "object",
													},
												},
												Required: []string{"match"},
												Type:     "object",
											},
										},
										Type: "array",
									},
									"deletionPolicy": {
										Default: &apiextensionsv1.JSON{
											Raw: []uint8{
												uint8(0x22),
												uint8(0x4e),
												uint8(0x6f),
												uint8(0x6e),
												uint8(0x65),
												uint8(0x22),
											},
										},
										Description: "Deletion Policy to handle Secrets in the provider. Possible Values: \"Delete/None\". Defaults to \"None\".",
										Type:        "string",
									},
									"refreshInterval": {
										Description: "The Interval to which External Secrets will try to push a secret definition",
										Type:        "string",
									},
									"secretStoreRefs": {
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{
											Schema: &apiextensionsv1.JSONSchemaProps{
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"kind": {
														Default: &apiextensionsv1.JSON{
															Raw: []uint8{
																uint8(0x22),
																uint8(0x53),
																uint8(0x65),
																uint8(0x63),
																uint8(0x72),
																uint8(0x65),
																uint8(0x74),
																uint8(0x53),
																uint8(0x74),
																uint8(0x6f),
																uint8(0x72),
																uint8(0x65),
																uint8(0x22),
															},
														},
														Description: "Kind of the SecretStore resource (SecretStore or ClusterSecretStore) Defaults to `SecretStore`",
														Type:        "string",
													},
													"labelSelector": {
														Description: "Optionally, sync to secret stores with label selector",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"matchExpressions": {
																Description: "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
																Items: &apiextensionsv1.JSONSchemaPropsOrArray{
																	Schema: &apiextensionsv1.JSONSchemaProps{
																		Description: "A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.",
																		Properties: map[string]apiextensionsv1.JSONSchemaProps{
																			"key": {
																				Description: "key is the label key that the selector applies to.",
																				Type:        "string",
																			},
																			"operator": {
																				Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.",
																				Type:        "string",
																			},
																			"values": {
																				Description: "values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.",
																				Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																				Type:        "array",
																			},
																		},
																		Required: []string{
																			"key",
																			"operator",
																		},
																		Type: "object",
																	},
																},
																Type: "array",
															},
															"matchLabels": {
																AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
																	Allows: true,
																	Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"},
																},
																Description: "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
																Type:        "object",
															},
														},
														Type:     "object",
														XMapType: P("atomic"),
													},
													"name": {
														Description: "Optionally, sync to the SecretStore of the given name",
														Type:        "string",
													},
												},
												Type: "object",
											},
										},
										Type: "array",
									},
									"selector": {
										Description: "The Secret Selector (k8s source) for the Push Secret",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"secret": {
												Description: "Select a Secret to Push.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"name": {
														Description: "Name of the Secret. The Secret must exist in the same namespace as the PushSecret manifest.",
														Type:        "string",
													},
												},
												Required: []string{"name"},
												Type:     "object",
											},
										},
										Required: []string{"secret"},
										Type:     "object",
									},
								},
								Required: []string{
									"secretStoreRefs",
									"selector",
								},
								Type: "object",
							},
							"status": {
								Description: "PushSecretStatus indicates the history of the status of PushSecret.",
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"conditions": {
										Items: &apiextensionsv1.JSONSchemaPropsOrArray{
											Schema: &apiextensionsv1.JSONSchemaProps{
												Description: "PushSecretStatusCondition indicates the status of the PushSecret.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"lastTransitionTime": {
														Format: "date-time",
														Type:   "string",
													},
													"message": {Type: "string"},
													"reason":  {Type: "string"},
													"status":  {Type: "string"},
													"type": {
														Description: "PushSecretConditionType indicates the condition of the PushSecret.",
														Type:        "string",
													},
												},
												Required: []string{
													"status",
													"type",
												},
												Type: "object",
											},
										},
										Type: "array",
									},
									"refreshTime": {
										Description: "refreshTime is the time and date the external secret was fetched and the target secret updated",
										Format:      "date-time",
										Nullable:    true,
										Type:        "string",
									},
									"syncedPushSecrets": {
										AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
											Allows: true,
											Schema: &apiextensionsv1.JSONSchemaProps{
												AdditionalProperties: &apiextensionsv1.JSONSchemaPropsOrBool{
													Allows: true,
													Schema: &apiextensionsv1.JSONSchemaProps{
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"match": {
																Description: "Match a given Secret Key to be pushed to the provider.",
																Properties: map[string]apiextensionsv1.JSONSchemaProps{
																	"remoteRef": {
																		Description: "Remote Refs to push to providers.",
																		Properties: map[string]apiextensionsv1.JSONSchemaProps{
																			"remoteKey": {
																				Description: "Name of the resulting provider secret.",
																				Type:        "string",
																			},
																		},
																		Required: []string{"remoteKey"},
																		Type:     "object",
																	},
																	"secretKey": {
																		Description: "Secret Key to be pushed",
																		Type:        "string",
																	},
																},
																Required: []string{
																	"remoteRef",
																	"secretKey",
																},
																Type: "object",
															},
														},
														Required: []string{"match"},
														Type:     "object",
													},
												},
												Type: "object",
											},
										},
										Description: "Synced Push Secrets for later deletion. Matches Secret Stores to PushSecretData that was stored to that secretStore.",
										Type:        "object",
									},
									"syncedResourceVersion": {
										Description: "SyncedResourceVersion keeps track of the last synced version.",
										Type:        "string",
									},
								},
								Type: "object",
							},
						},
						Type: "object",
					},
				},
				Served:       true,
				Storage:      true,
				Subresources: &apiextensionsv1.CustomResourceSubresources{},
			},
		},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
