/// <reference types="angular-mocks" />
import type { ILogService, IQService } from 'angular';
import type { Application } from '../application/application.model';
import type { ProviderServiceDelegate } from '../cloudProvider/providerService.delegate';
import type { ISecurityGroup } from '../domain';
import type { IEntityTags } from '../domain/IEntityTags';
import type { IMoniker } from '../naming/IMoniker';
import type { SecurityGroupTransformerService } from './securityGroupTransformer.service';
export interface ISecurityGroupsByAccount {
    [account: string]: {
        [region: string]: {
            [name: string]: ISecurityGroup;
        };
    };
}
export interface IApplicationSecurityGroup {
    name: string;
}
export interface IReaderSecurityGroup extends ISecurityGroup {
    securityGroups: {
        [region: string]: ISecurityGroup[];
    };
}
export interface IRangeRule {
    portRanges: Array<{
        startPort: number;
        endPort: number;
    }>;
    protocol: string;
    description: string;
}
export interface ISecurityGroupRule extends IRangeRule {
    securityGroup: ISecurityGroup;
}
export interface IAddressableRange {
    ip: string;
    cidr: string;
}
export interface IIPRangeRule extends IRangeRule {
    range: IAddressableRange;
}
export interface ISecurityGroupProcessorResult {
    notFoundCaught: boolean;
    securityGroups: ISecurityGroup[];
}
export interface ISecurityGroupSummary {
    id: string;
    name: string;
    vpcId: string;
    moniker?: IMoniker;
}
export interface ISecurityGroupsByAccountSourceData {
    [account: string]: {
        [provider: string]: {
            [region: string]: ISecurityGroupSummary[];
        };
    };
}
export interface ISecurityGroupDetail {
    inboundRules: ISecurityGroupRule[] & IIPRangeRule[];
    ipRangeRules: ISecurityGroupRule[];
    region: string;
    name: string;
    entityTags: IEntityTags;
    securityGroupRules: ISecurityGroupRule[];
}
export declare class SecurityGroupReader {
    private $log;
    private $q;
    private securityGroupTransformer;
    private providerServiceDelegate;
    private static indexSecurityGroups;
    private static attachUsageFields;
    private static sortUsages;
    private resolve;
    private addLoadBalancerSecurityGroups;
    private addNameBasedSecurityGroups;
    private addServerGroupSecurityGroups;
    private clearCacheAndRetryAttachingSecurityGroups;
    private addNamePartsToSecurityGroup;
    private attachSecurityGroups;
    static $inject: string[];
    constructor($log: ILogService, $q: IQService, securityGroupTransformer: SecurityGroupTransformerService, providerServiceDelegate: ProviderServiceDelegate);
    private getAllSecurityGroupsPromise;
    getAllSecurityGroups(): PromiseLike<ISecurityGroupsByAccountSourceData>;
    private compress;
    private decompress;
    getApplicationSecurityGroup(application: Application, account: string, region: string, id: string): IApplicationSecurityGroup;
    getApplicationSecurityGroups(application: Application, nameBasedSecurityGroups: ISecurityGroup[]): PromiseLike<any>;
    getSecurityGroupDetails(application: Application, account: string, provider: string, region: string, vpcId: string, id: string): PromiseLike<ISecurityGroupDetail>;
    loadSecurityGroups(): PromiseLike<ISecurityGroupsByAccount>;
    loadSecurityGroupsByApplicationName(applicationName: string): PromiseLike<ISecurityGroup[]>;
}
export declare const SECURITY_GROUP_READER = "spinnaker.core.securityGroup.read.service";
