// 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 EcrauthorizationtokensGeneratorsCrd = &apiextensionsv1.CustomResourceDefinition{
	ObjectMeta: metav1.ObjectMeta{
		Annotations: map[string]string{"controller-gen.kubebuilder.io/version": "v0.11.1"},
		Name:        "ecrauthorizationtokens.generators.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: "generators.external-secrets.io",
		Names: apiextensionsv1.CustomResourceDefinitionNames{
			Categories: []string{"ecrauthorizationtoken"},
			Kind:       "ECRAuthorizationToken",
			ListKind:   "ECRAuthorizationTokenList",
			Plural:     "ecrauthorizationtokens",
			ShortNames: []string{"ecrauthorizationtoken"},
			Singular:   "ecrauthorizationtoken",
		},
		Scope: apiextensionsv1.ResourceScope("Namespaced"),
		Versions: []apiextensionsv1.CustomResourceDefinitionVersion{
			{
				Name: "v1alpha1",
				Schema: &apiextensionsv1.CustomResourceValidation{
					OpenAPIV3Schema: &apiextensionsv1.JSONSchemaProps{
						Description: "ECRAuthorizationTokenSpec uses the GetAuthorizationToken API to retrieve an authorization token. The authorization token is valid for 12 hours. The authorizationToken returned is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. For more information, see Registry authentication (https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth) in the Amazon Elastic Container Registry User Guide.",
						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": {
								Properties: map[string]apiextensionsv1.JSONSchemaProps{
									"auth": {
										Description: "Auth defines how to authenticate with AWS",
										Properties: map[string]apiextensionsv1.JSONSchemaProps{
											"jwt": {
												Description: "Authenticate against AWS using service account tokens.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"serviceAccountRef": {
														Description: "A reference to a ServiceAccount resource.",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"audiences": {
																Description: "Audience specifies the `aud` claim for the service account token If the service account uses a well-known annotation for e.g. IRSA or GCP Workload Identity then this audiences will be appended to the list",
																Items:       &apiextensionsv1.JSONSchemaPropsOrArray{Schema: &apiextensionsv1.JSONSchemaProps{Type: "string"}},
																Type:        "array",
															},
															"name": {
																Description: "The name of the ServiceAccount resource being referred to.",
																Type:        "string",
															},
															"namespace": {
																Description: "Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults to the namespace of the referent.",
																Type:        "string",
															},
														},
														Required: []string{"name"},
														Type:     "object",
													},
												},
												Type: "object",
											},
											"secretRef": {
												Description: "AWSAuthSecretRef holds secret references for AWS credentials both AccessKeyID and SecretAccessKey must be defined in order to properly authenticate.",
												Properties: map[string]apiextensionsv1.JSONSchemaProps{
													"accessKeyIDSecretRef": {
														Description: "The AccessKeyID is used for authentication",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"key": {
																Description: "The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required.",
																Type:        "string",
															},
															"name": {
																Description: "The name of the Secret resource being referred to.",
																Type:        "string",
															},
															"namespace": {
																Description: "Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults to the namespace of the referent.",
																Type:        "string",
															},
														},
														Type: "object",
													},
													"secretAccessKeySecretRef": {
														Description: "The SecretAccessKey is used for authentication",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"key": {
																Description: "The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required.",
																Type:        "string",
															},
															"name": {
																Description: "The name of the Secret resource being referred to.",
																Type:        "string",
															},
															"namespace": {
																Description: "Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults to the namespace of the referent.",
																Type:        "string",
															},
														},
														Type: "object",
													},
													"sessionTokenSecretRef": {
														Description: "The SessionToken used for authentication This must be defined if AccessKeyID and SecretAccessKey are temporary credentials see: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html",
														Properties: map[string]apiextensionsv1.JSONSchemaProps{
															"key": {
																Description: "The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required.",
																Type:        "string",
															},
															"name": {
																Description: "The name of the Secret resource being referred to.",
																Type:        "string",
															},
															"namespace": {
																Description: "Namespace of the resource being referred to. Ignored if referent is not cluster-scoped. cluster-scoped defaults to the namespace of the referent.",
																Type:        "string",
															},
														},
														Type: "object",
													},
												},
												Type: "object",
											},
										},
										Type: "object",
									},
									"region": {
										Description: "Region specifies the region to operate in.",
										Type:        "string",
									},
									"role": {
										Description: "You can assume a role before making calls to the desired AWS service.",
										Type:        "string",
									},
								},
								Required: []string{"region"},
								Type:     "object",
							},
						},
						Type: "object",
					},
				},
				Served:       true,
				Storage:      true,
				Subresources: &apiextensionsv1.CustomResourceSubresources{},
			},
		},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "apiextensions.k8s.io/v1",
		Kind:       "CustomResourceDefinition",
	},
}
