import { KubernetesObject } from "kubernetes-fluent-client"; import { AdmissionRequest, ValidateActionResponse } from "./common-types"; /** * The RequestWrapper class provides methods to modify Kubernetes objects in the context * of a mutating webhook request. */ export declare class PeprValidateRequest { #private; Raw: T; /** * Provides access to the old resource in the request if available. * @returns The old Kubernetes resource object or null if not available. */ get OldResource(): KubernetesObject | undefined; /** * Provides access to the request object. * @returns The request object containing the Kubernetes resource. */ get Request(): AdmissionRequest; /** * Creates a new instance of the Action class. * @param input - The request object containing the Kubernetes resource to modify. */ constructor(input: AdmissionRequest); /** * Check if a label exists on the Kubernetes resource. * * @param key the label key to check * @returns */ HasLabel: (key: string) => boolean; /** * Check if an annotation exists on the Kubernetes resource. * * @param key the annotation key to check * @returns */ HasAnnotation: (key: string) => boolean; /** * Create a validation response that allows the request. * * @returns The validation response. */ Approve: (warnings?: string[]) => ValidateActionResponse; /** * Create a validation response that denies the request. * * @param statusMessage Optional status message to return to the user. * @param statusCode Optional status code to return to the user. * @returns The validation response. */ Deny: (statusMessage?: string, statusCode?: number, warnings?: string[]) => ValidateActionResponse; } //# sourceMappingURL=validate-request.d.ts.map