/**
 * @packageDocumentation
 * @module utils
 */
import { DialogService, MessageService } from '@alauda/ui';
import { Injector } from '@angular/core';
import { Observable } from 'rxjs';
import { K8sApiService } from '../api/k8s-api.service';
import { ResourceDeleteParams } from '../api/types';
import { TranslateService } from '../translate/translate.service';
import { KubernetesResource, Status } from '../types/k8s';
export declare const METADATA = "metadata";
export declare const NAMESPACE = "namespace";
export declare const NAME = "name";
export declare const CREATION_TIMESTAMP = "creationTimestamp";
export declare const ANNOTATIONS = "annotations";
export declare const LABELS = "labels";
export declare const DISPLAY_NAME = "display-name";
export declare const DESCRIPTION = "description";
export declare const CREATOR = "creator";
export declare const UPDATED_AT = "updated-at";
export declare const PROJECT = "project";
export declare const CLUSTER = "cluster";
export interface BaseNormalizeTypeParams {
    type: string;
    baseDomain: string;
    prefix?: string;
}
export declare class K8sUtilService<R extends string = string> {
    protected injector: Injector;
    protected dialog: DialogService;
    protected message: MessageService;
    protected k8sApi: K8sApiService<R>;
    protected translate: TranslateService;
    protected baseDomain: string;
    constructor(injector: Injector);
    /**
     * @param type - 对应资源的翻译 key
     */
    deleteResource<T extends KubernetesResource>(params: ResourceDeleteParams<R, T>, typeOrOptions: string | {
        type: string;
        content: string;
    }): Observable<Status>;
    updateResource<T extends KubernetesResource>({ type, cluster, resource, }: {
        type: R;
        cluster: string;
        resource: T;
    }): Observable<T>;
    updateGlobalResource<T extends KubernetesResource>({ type, namespaced, resource, }: {
        type: R;
        namespaced: boolean;
        resource: T;
    }): Observable<T>;
    normalizeType(type: string, prefix?: string): string;
    normalizeType(params: BaseNormalizeTypeParams): string;
    getAnnotation<T extends KubernetesResource>(resource: T, type: string, prefix?: string): string;
    getAnnotation<T extends KubernetesResource>(resource: T, params: BaseNormalizeTypeParams): string;
    getNamespace<T extends KubernetesResource>(resource: T): T["metadata"]["namespace"];
    getName<T extends KubernetesResource>(resource: T): T["metadata"]["name"];
    getCreationTimestamp<T extends KubernetesResource>(resource: T): T["metadata"]["creationTimestamp"];
    getDisplayName<T extends KubernetesResource>(resource: T, prefix?: string): string;
    getUnionDisplayName<T extends KubernetesResource>(resource: T, namePrefix?: string | false, displayNamePrefix?: string): string;
    getDescription<T extends KubernetesResource>(resource: T, prefix?: string): string;
    getCreator<T extends KubernetesResource>(resource: T, prefix?: string): string;
    getUpdatedAt<T extends KubernetesResource>(resource: T, prefix?: string): string;
    getLabel<T extends KubernetesResource>(resource: T, type: string, prefix?: string): string;
    getLabel<T extends KubernetesResource>(resource: T, params: BaseNormalizeTypeParams): string;
    getProject<T extends KubernetesResource>(resource: T): string;
    private retryUpdate;
}
