/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from '@grpc/grpc-js';
import _m0 from 'protobufjs/minimal';
export declare const protobufPackage = "yandex.cloud.serverless.functions.v1";
/** A VPC network used in serverless resources. */
export interface UsedNetwork {
    /** ID of the VPC network. */
    networkId: string;
    /** ID of the cloud that the network belongs to. */
    cloudId: string;
    /** ID of the folder that the network belongs to. */
    folderId: string;
    /** Status of the network. */
    status: UsedNetwork_Status;
    /** Clean-up timestamp of the obsolete network. */
    willBeCleanedUpAt?: Date;
    /** Number of serverless resources connected to the network. */
    connectionsCount: number;
}
export declare enum UsedNetwork_Status {
    STATUS_UNSPECIFIED = 0,
    /** CREATING - Network is connecting to its first serverless resource. */
    CREATING = 1,
    /** ACTIVE - Network is already being used by some serverless resources. */
    ACTIVE = 2,
    /**
     * OBSOLETE - Network is no longer used by any serverless resources.
     * It will be cleaned-up after a while.
     */
    OBSOLETE = 3,
    UNRECOGNIZED = -1
}
export declare function usedNetwork_StatusFromJSON(object: any): UsedNetwork_Status;
export declare function usedNetwork_StatusToJSON(object: UsedNetwork_Status): string;
export interface GetUsedNetworkRequest {
    /** ID of the network to return. */
    networkId: string;
}
export interface ListUsedNetworksRequest {
    /**
     * The maximum number of results per page to return. If the number of available
     * results is larger than `pageSize`, the service returns a [ListUsedNetworksResponse.next_page_token]
     * that can be used to get the next page of results in subsequent list requests.
     *
     * Default value: 100.
     */
    pageSize: number;
    /**
     * Page token. To get the next page of results, set `pageToken` to the
     * [ListUsedNetworksResponse.next_page_token] returned by a previous list request.
     */
    pageToken: string;
    /** ID of the cloud to list used networks in. */
    cloudId: string | undefined;
    /** ID of the folder to list used networks in. */
    folderId: string | undefined;
}
export interface ListUsedNetworksResponse {
    /** List of used networks in the specified scope. */
    networks: UsedNetwork[];
    /**
     * Token for getting the next page of the list. If the number of results is greater than
     * the specified [ListUsedNetworksRequest.page_size], use `nextPageToken` as the value
     * for the [ListUsedNetworksRequest.page_token] parameter in the next list request.
     *
     * Each subsequent page will have its own `nextPageToken` to continue paging through the results.
     */
    nextPageToken: string;
}
export interface ListConnectedResourcesRequest {
    /**
     * The maximum number of results per page to return. If the number of available
     * results is larger than `pageSize`, the service returns a [ListConnectedResourcesResponse.next_page_token]
     * that can be used to get the next page of results in subsequent list requests.
     *
     * Default value: 100.
     */
    pageSize: number;
    /**
     * Page token. To get the next page of results, set `pageToken` to the
     * [ListConnectedResourcesResponse.next_page_token] returned by a previous list request.
     */
    pageToken: string;
    /** ID of the network to list serverless resources connected to it. */
    networkId: string | undefined;
    /** ID of the cloud to list serverless resources connected to any network from it. */
    cloudId: string | undefined;
    /** ID of the folder to list serverless resources connected to any network from it. */
    folderId: string | undefined;
}
export interface ListConnectedResourcesResponse {
    /** List of serverless resources connected to any network from the specified scope. */
    resources: ListConnectedResourcesResponse_ConnectedResource[];
    /**
     * Token for getting the next page of the list. If the number of results is greater than
     * the specified [ListConnectedResourcesRequest.page_size], use `nextPageToken` as the value
     * for the [ListConnectedResourcesRequest.page_token] parameter in the next list request.
     *
     * Each subsequent page will have its own `nextPageToken` to continue paging through the results.
     */
    nextPageToken: string;
}
/** Serverless resource connected to VPC network. */
export interface ListConnectedResourcesResponse_ConnectedResource {
    /** ID of the network to which the resource is connected. */
    networkId: string;
    /** Type of the serverless resource. */
    resourceType: string;
    /** ID of the serverless resource. */
    resourceId: string;
    /** Type of the serverless subresource. */
    subresourceType: string;
    /** ID of the serverless subresource. */
    subresourceId: string;
    /** ID of the cloud that the resource belongs to. */
    resourceCloudId: string;
    /** ID of the folder thar the resource belongs to. */
    resourceFolderId: string;
}
export interface TriggerUsedNetworkCleanupRequest {
    /** ID of the obsolete network to start the cleanup process for. */
    networkId: string;
}
export interface TriggerUsedNetworkCleanupResponse {
    /** Timestamp when cleanup of the specified network will be started. */
    networkCleanupTime?: Date;
}
export declare const UsedNetwork: {
    encode(message: UsedNetwork, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): UsedNetwork;
    fromJSON(object: any): UsedNetwork;
    toJSON(message: UsedNetwork): unknown;
    fromPartial<I extends {
        networkId?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
        status?: UsedNetwork_Status | undefined;
        willBeCleanedUpAt?: Date | undefined;
        connectionsCount?: number | undefined;
    } & {
        networkId?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
        status?: UsedNetwork_Status | undefined;
        willBeCleanedUpAt?: Date | undefined;
        connectionsCount?: number | undefined;
    } & Record<Exclude<keyof I, keyof UsedNetwork>, never>>(object: I): UsedNetwork;
};
export declare const GetUsedNetworkRequest: {
    encode(message: GetUsedNetworkRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): GetUsedNetworkRequest;
    fromJSON(object: any): GetUsedNetworkRequest;
    toJSON(message: GetUsedNetworkRequest): unknown;
    fromPartial<I extends {
        networkId?: string | undefined;
    } & {
        networkId?: string | undefined;
    } & Record<Exclude<keyof I, "networkId">, never>>(object: I): GetUsedNetworkRequest;
};
export declare const ListUsedNetworksRequest: {
    encode(message: ListUsedNetworksRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListUsedNetworksRequest;
    fromJSON(object: any): ListUsedNetworksRequest;
    toJSON(message: ListUsedNetworksRequest): unknown;
    fromPartial<I extends {
        pageSize?: number | undefined;
        pageToken?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
    } & {
        pageSize?: number | undefined;
        pageToken?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListUsedNetworksRequest>, never>>(object: I): ListUsedNetworksRequest;
};
export declare const ListUsedNetworksResponse: {
    encode(message: ListUsedNetworksResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListUsedNetworksResponse;
    fromJSON(object: any): ListUsedNetworksResponse;
    toJSON(message: ListUsedNetworksResponse): unknown;
    fromPartial<I extends {
        networks?: {
            networkId?: string | undefined;
            cloudId?: string | undefined;
            folderId?: string | undefined;
            status?: UsedNetwork_Status | undefined;
            willBeCleanedUpAt?: Date | undefined;
            connectionsCount?: number | undefined;
        }[] | undefined;
        nextPageToken?: string | undefined;
    } & {
        networks?: ({
            networkId?: string | undefined;
            cloudId?: string | undefined;
            folderId?: string | undefined;
            status?: UsedNetwork_Status | undefined;
            willBeCleanedUpAt?: Date | undefined;
            connectionsCount?: number | undefined;
        }[] & ({
            networkId?: string | undefined;
            cloudId?: string | undefined;
            folderId?: string | undefined;
            status?: UsedNetwork_Status | undefined;
            willBeCleanedUpAt?: Date | undefined;
            connectionsCount?: number | undefined;
        } & {
            networkId?: string | undefined;
            cloudId?: string | undefined;
            folderId?: string | undefined;
            status?: UsedNetwork_Status | undefined;
            willBeCleanedUpAt?: Date | undefined;
            connectionsCount?: number | undefined;
        } & Record<Exclude<keyof I["networks"][number], keyof UsedNetwork>, never>)[] & Record<Exclude<keyof I["networks"], keyof {
            networkId?: string | undefined;
            cloudId?: string | undefined;
            folderId?: string | undefined;
            status?: UsedNetwork_Status | undefined;
            willBeCleanedUpAt?: Date | undefined;
            connectionsCount?: number | undefined;
        }[]>, never>) | undefined;
        nextPageToken?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListUsedNetworksResponse>, never>>(object: I): ListUsedNetworksResponse;
};
export declare const ListConnectedResourcesRequest: {
    encode(message: ListConnectedResourcesRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListConnectedResourcesRequest;
    fromJSON(object: any): ListConnectedResourcesRequest;
    toJSON(message: ListConnectedResourcesRequest): unknown;
    fromPartial<I extends {
        pageSize?: number | undefined;
        pageToken?: string | undefined;
        networkId?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
    } & {
        pageSize?: number | undefined;
        pageToken?: string | undefined;
        networkId?: string | undefined;
        cloudId?: string | undefined;
        folderId?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListConnectedResourcesRequest>, never>>(object: I): ListConnectedResourcesRequest;
};
export declare const ListConnectedResourcesResponse: {
    encode(message: ListConnectedResourcesResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListConnectedResourcesResponse;
    fromJSON(object: any): ListConnectedResourcesResponse;
    toJSON(message: ListConnectedResourcesResponse): unknown;
    fromPartial<I extends {
        resources?: {
            networkId?: string | undefined;
            resourceType?: string | undefined;
            resourceId?: string | undefined;
            subresourceType?: string | undefined;
            subresourceId?: string | undefined;
            resourceCloudId?: string | undefined;
            resourceFolderId?: string | undefined;
        }[] | undefined;
        nextPageToken?: string | undefined;
    } & {
        resources?: ({
            networkId?: string | undefined;
            resourceType?: string | undefined;
            resourceId?: string | undefined;
            subresourceType?: string | undefined;
            subresourceId?: string | undefined;
            resourceCloudId?: string | undefined;
            resourceFolderId?: string | undefined;
        }[] & ({
            networkId?: string | undefined;
            resourceType?: string | undefined;
            resourceId?: string | undefined;
            subresourceType?: string | undefined;
            subresourceId?: string | undefined;
            resourceCloudId?: string | undefined;
            resourceFolderId?: string | undefined;
        } & {
            networkId?: string | undefined;
            resourceType?: string | undefined;
            resourceId?: string | undefined;
            subresourceType?: string | undefined;
            subresourceId?: string | undefined;
            resourceCloudId?: string | undefined;
            resourceFolderId?: string | undefined;
        } & Record<Exclude<keyof I["resources"][number], keyof ListConnectedResourcesResponse_ConnectedResource>, never>)[] & Record<Exclude<keyof I["resources"], keyof {
            networkId?: string | undefined;
            resourceType?: string | undefined;
            resourceId?: string | undefined;
            subresourceType?: string | undefined;
            subresourceId?: string | undefined;
            resourceCloudId?: string | undefined;
            resourceFolderId?: string | undefined;
        }[]>, never>) | undefined;
        nextPageToken?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListConnectedResourcesResponse>, never>>(object: I): ListConnectedResourcesResponse;
};
export declare const ListConnectedResourcesResponse_ConnectedResource: {
    encode(message: ListConnectedResourcesResponse_ConnectedResource, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): ListConnectedResourcesResponse_ConnectedResource;
    fromJSON(object: any): ListConnectedResourcesResponse_ConnectedResource;
    toJSON(message: ListConnectedResourcesResponse_ConnectedResource): unknown;
    fromPartial<I extends {
        networkId?: string | undefined;
        resourceType?: string | undefined;
        resourceId?: string | undefined;
        subresourceType?: string | undefined;
        subresourceId?: string | undefined;
        resourceCloudId?: string | undefined;
        resourceFolderId?: string | undefined;
    } & {
        networkId?: string | undefined;
        resourceType?: string | undefined;
        resourceId?: string | undefined;
        subresourceType?: string | undefined;
        subresourceId?: string | undefined;
        resourceCloudId?: string | undefined;
        resourceFolderId?: string | undefined;
    } & Record<Exclude<keyof I, keyof ListConnectedResourcesResponse_ConnectedResource>, never>>(object: I): ListConnectedResourcesResponse_ConnectedResource;
};
export declare const TriggerUsedNetworkCleanupRequest: {
    encode(message: TriggerUsedNetworkCleanupRequest, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): TriggerUsedNetworkCleanupRequest;
    fromJSON(object: any): TriggerUsedNetworkCleanupRequest;
    toJSON(message: TriggerUsedNetworkCleanupRequest): unknown;
    fromPartial<I extends {
        networkId?: string | undefined;
    } & {
        networkId?: string | undefined;
    } & Record<Exclude<keyof I, "networkId">, never>>(object: I): TriggerUsedNetworkCleanupRequest;
};
export declare const TriggerUsedNetworkCleanupResponse: {
    encode(message: TriggerUsedNetworkCleanupResponse, writer?: _m0.Writer): _m0.Writer;
    decode(input: _m0.Reader | Uint8Array, length?: number): TriggerUsedNetworkCleanupResponse;
    fromJSON(object: any): TriggerUsedNetworkCleanupResponse;
    toJSON(message: TriggerUsedNetworkCleanupResponse): unknown;
    fromPartial<I extends {
        networkCleanupTime?: Date | undefined;
    } & {
        networkCleanupTime?: Date | undefined;
    } & Record<Exclude<keyof I, "networkCleanupTime">, never>>(object: I): TriggerUsedNetworkCleanupResponse;
};
/** A set of methods for managing VPC networks connected to serverless resources. */
export declare const NetworkServiceService: {
    /** Returns the specified network used in serverless resources. */
    readonly getUsed: {
        readonly path: "/yandex.cloud.serverless.functions.v1.NetworkService/GetUsed";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: GetUsedNetworkRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => GetUsedNetworkRequest;
        readonly responseSerialize: (value: UsedNetwork) => Buffer;
        readonly responseDeserialize: (value: Buffer) => UsedNetwork;
    };
    /** Retrieves the list of networks in the specified scope that are used in serverless resources. */
    readonly listUsed: {
        readonly path: "/yandex.cloud.serverless.functions.v1.NetworkService/ListUsed";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: ListUsedNetworksRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ListUsedNetworksRequest;
        readonly responseSerialize: (value: ListUsedNetworksResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => ListUsedNetworksResponse;
    };
    /** Retrieves the list of serverless resources connected to any network from the specified scope. */
    readonly listConnectedResources: {
        readonly path: "/yandex.cloud.serverless.functions.v1.NetworkService/ListConnectedResources";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: ListConnectedResourcesRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => ListConnectedResourcesRequest;
        readonly responseSerialize: (value: ListConnectedResourcesResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => ListConnectedResourcesResponse;
    };
    /**
     * Forces obsolete used network to start cleanup process as soon as possible.
     * Invocation does not wait for start or end of the cleanup process.
     * Second invocation with the same network does nothing until network is completely cleaned-up.
     */
    readonly triggerUsedCleanup: {
        readonly path: "/yandex.cloud.serverless.functions.v1.NetworkService/TriggerUsedCleanup";
        readonly requestStream: false;
        readonly responseStream: false;
        readonly requestSerialize: (value: TriggerUsedNetworkCleanupRequest) => Buffer;
        readonly requestDeserialize: (value: Buffer) => TriggerUsedNetworkCleanupRequest;
        readonly responseSerialize: (value: TriggerUsedNetworkCleanupResponse) => Buffer;
        readonly responseDeserialize: (value: Buffer) => TriggerUsedNetworkCleanupResponse;
    };
};
export interface NetworkServiceServer extends UntypedServiceImplementation {
    /** Returns the specified network used in serverless resources. */
    getUsed: handleUnaryCall<GetUsedNetworkRequest, UsedNetwork>;
    /** Retrieves the list of networks in the specified scope that are used in serverless resources. */
    listUsed: handleUnaryCall<ListUsedNetworksRequest, ListUsedNetworksResponse>;
    /** Retrieves the list of serverless resources connected to any network from the specified scope. */
    listConnectedResources: handleUnaryCall<ListConnectedResourcesRequest, ListConnectedResourcesResponse>;
    /**
     * Forces obsolete used network to start cleanup process as soon as possible.
     * Invocation does not wait for start or end of the cleanup process.
     * Second invocation with the same network does nothing until network is completely cleaned-up.
     */
    triggerUsedCleanup: handleUnaryCall<TriggerUsedNetworkCleanupRequest, TriggerUsedNetworkCleanupResponse>;
}
export interface NetworkServiceClient extends Client {
    /** Returns the specified network used in serverless resources. */
    getUsed(request: GetUsedNetworkRequest, callback: (error: ServiceError | null, response: UsedNetwork) => void): ClientUnaryCall;
    getUsed(request: GetUsedNetworkRequest, metadata: Metadata, callback: (error: ServiceError | null, response: UsedNetwork) => void): ClientUnaryCall;
    getUsed(request: GetUsedNetworkRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: UsedNetwork) => void): ClientUnaryCall;
    /** Retrieves the list of networks in the specified scope that are used in serverless resources. */
    listUsed(request: ListUsedNetworksRequest, callback: (error: ServiceError | null, response: ListUsedNetworksResponse) => void): ClientUnaryCall;
    listUsed(request: ListUsedNetworksRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListUsedNetworksResponse) => void): ClientUnaryCall;
    listUsed(request: ListUsedNetworksRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListUsedNetworksResponse) => void): ClientUnaryCall;
    /** Retrieves the list of serverless resources connected to any network from the specified scope. */
    listConnectedResources(request: ListConnectedResourcesRequest, callback: (error: ServiceError | null, response: ListConnectedResourcesResponse) => void): ClientUnaryCall;
    listConnectedResources(request: ListConnectedResourcesRequest, metadata: Metadata, callback: (error: ServiceError | null, response: ListConnectedResourcesResponse) => void): ClientUnaryCall;
    listConnectedResources(request: ListConnectedResourcesRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: ListConnectedResourcesResponse) => void): ClientUnaryCall;
    /**
     * Forces obsolete used network to start cleanup process as soon as possible.
     * Invocation does not wait for start or end of the cleanup process.
     * Second invocation with the same network does nothing until network is completely cleaned-up.
     */
    triggerUsedCleanup(request: TriggerUsedNetworkCleanupRequest, callback: (error: ServiceError | null, response: TriggerUsedNetworkCleanupResponse) => void): ClientUnaryCall;
    triggerUsedCleanup(request: TriggerUsedNetworkCleanupRequest, metadata: Metadata, callback: (error: ServiceError | null, response: TriggerUsedNetworkCleanupResponse) => void): ClientUnaryCall;
    triggerUsedCleanup(request: TriggerUsedNetworkCleanupRequest, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: TriggerUsedNetworkCleanupResponse) => void): ClientUnaryCall;
}
export declare const NetworkServiceClient: {
    new (address: string, credentials: ChannelCredentials, options?: Partial<ChannelOptions>): NetworkServiceClient;
    service: typeof NetworkServiceService;
};
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : Partial<T>;
type KeysOfUnion<T> = T extends T ? keyof T : never;
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
    [K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P>>, never>;
export {};
