//go:build !ignore_autogenerated

// Code generated by remove-junk-from-types-now-9000; DO NOT EDIT.
// Generator module: gitlab.com/gitlab-org/cluster-integration/remove-junk-from-types-now-9000
// Generator version: v0.0.0-20250822064315-c19420349bc1
// Configuration file: no_junk_config.json
// Source module: github.com/fluxcd/notification-controller/api
// Source module version: v1.6.0
// Source module query:
// Source module sum: h1:t0k662zxnUZlnDvFrk4DBDl6iivFmJxbwuRdyhH9Ot4=
// Source module package: v1beta3

package v1beta3

import (
	meta "github.com/fluxcd/pkg/apis/meta"
	v1 "gitlab.com/gitlab-org/cluster-integration/gitlab-agent/v18/internal/module/kubernetes_api/agent/watch_graph/vendored/github.com/fluxcd/notification-controller/api/v1"
)

// Alert is the Schema for the alerts API
type Alert struct {
	Spec AlertSpec `json:"spec,omitempty"`
}

// AlertSpec defines an alerting rule for events involving a list of objects.
type AlertSpec struct {
	// ProviderRef specifies which Provider this Alert should use.
	// +required
	ProviderRef meta.LocalObjectReference `json:"providerRef"`
	// EventSources specifies how to filter events based
	// on the involved object kind, name and namespace.
	// +required
	EventSources []v1.CrossNamespaceObjectReference `json:"eventSources"`
}

// Provider is the Schema for the providers API
type Provider struct {
	Spec ProviderSpec `json:"spec,omitempty"`
}

// ProviderSpec defines the desired state of the Provider.
// +kubebuilder:validation:XValidation:rule="self.type == 'github' || self.type == 'gitlab' || self.type == 'gitea' || self.type == 'bitbucketserver' || self.type == 'bitbucket' || self.type == 'azuredevops' || !has(self.commitStatusExpr)", message="spec.commitStatusExpr is only supported for the 'github', 'gitlab', 'gitea', 'bitbucketserver', 'bitbucket', 'azuredevops' provider types"
type ProviderSpec struct {
	// SecretRef specifies the Secret containing the authentication
	// credentials for this Provider.
	// +optional
	SecretRef *meta.LocalObjectReference `json:"secretRef,omitempty"`
	// ServiceAccountName is the name of the service account used to
	// authenticate with services from cloud providers. An error is thrown if a
	// static credential is also defined inside the Secret referenced by the
	// SecretRef.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// CertSecretRef specifies the Secret containing
	// a PEM-encoded CA certificate (in the `ca.crt` key).
	// +optional
	//
	// Note: Support for the `caFile` key has
	// been deprecated.
	CertSecretRef *meta.LocalObjectReference `json:"certSecretRef,omitempty"`
}
