import * as HttpClient from "effect/unstable/http/HttpClient";
import * as redacted from "effect/Redacted";
import * as S from "effect/Schema";
import * as stream from "effect/Stream";
import * as API from "../client/api.ts";
import type { Credentials } from "../credentials.ts";
import type { CommonErrors } from "../errors.ts";
import type { Region } from "../region.ts";
export type TunnelId = string;
export type DeleteFlag = boolean;
export type ErrorMessage = string;
export type TunnelArn = string;
export type Description = string;
export type ThingName = string;
export type Service = string;
export type TimeoutInMin = number;
export type TagKey = string;
export type TagValue = string;
export type AmazonResourceName = string;
export type MaxResults = number;
export type NextToken = string;
export type ClientAccessToken = string | redacted.Redacted<string>;
export interface CloseTunnelRequest {
    tunnelId: string;
    delete?: boolean;
}
export declare const CloseTunnelRequest: S.Schema<CloseTunnelRequest>;
export interface CloseTunnelResponse {
}
export declare const CloseTunnelResponse: S.Schema<CloseTunnelResponse>;
export interface DescribeTunnelRequest {
    tunnelId: string;
}
export declare const DescribeTunnelRequest: S.Schema<DescribeTunnelRequest>;
export type TunnelStatus = "OPEN" | "CLOSED" | (string & {});
export declare const TunnelStatus: S.String;
export type ConnectionStatus = "CONNECTED" | "DISCONNECTED" | (string & {});
export declare const ConnectionStatus: S.String;
export interface ConnectionState {
    status?: ConnectionStatus;
    lastUpdatedAt?: Date;
}
export declare const ConnectionState: S.Schema<ConnectionState>;
export type ServiceList = string[];
export declare const ServiceList: S.$Array<S.String>;
export interface DestinationConfig {
    thingName?: string;
    services: string[];
}
export declare const DestinationConfig: S.Schema<DestinationConfig>;
export interface TimeoutConfig {
    maxLifetimeTimeoutMinutes?: number;
}
export declare const TimeoutConfig: S.Schema<TimeoutConfig>;
export interface Tag {
    key: string;
    value: string;
}
export declare const Tag: S.Schema<Tag>;
export type TagList = Tag[];
export declare const TagList: S.$Array<S.Schema<Tag>>;
export interface Tunnel {
    tunnelId?: string;
    tunnelArn?: string;
    status?: TunnelStatus;
    sourceConnectionState?: ConnectionState;
    destinationConnectionState?: ConnectionState;
    description?: string;
    destinationConfig?: DestinationConfig;
    timeoutConfig?: TimeoutConfig;
    tags?: Tag[];
    createdAt?: Date;
    lastUpdatedAt?: Date;
}
export declare const Tunnel: S.Schema<Tunnel>;
export interface DescribeTunnelResponse {
    tunnel?: Tunnel;
}
export declare const DescribeTunnelResponse: S.Schema<DescribeTunnelResponse>;
export interface ListTagsForResourceRequest {
    resourceArn: string;
}
export declare const ListTagsForResourceRequest: S.Schema<ListTagsForResourceRequest>;
export interface ListTagsForResourceResponse {
    tags?: Tag[];
}
export declare const ListTagsForResourceResponse: S.Schema<ListTagsForResourceResponse>;
export interface ListTunnelsRequest {
    thingName?: string;
    maxResults?: number;
    nextToken?: string;
}
export declare const ListTunnelsRequest: S.Schema<ListTunnelsRequest>;
export interface TunnelSummary {
    tunnelId?: string;
    tunnelArn?: string;
    status?: TunnelStatus;
    description?: string;
    createdAt?: Date;
    lastUpdatedAt?: Date;
}
export declare const TunnelSummary: S.Schema<TunnelSummary>;
export type TunnelSummaryList = TunnelSummary[];
export declare const TunnelSummaryList: S.$Array<S.Schema<TunnelSummary>>;
export interface ListTunnelsResponse {
    tunnelSummaries?: TunnelSummary[];
    nextToken?: string;
}
export declare const ListTunnelsResponse: S.Schema<ListTunnelsResponse>;
export interface OpenTunnelRequest {
    description?: string;
    tags?: Tag[];
    destinationConfig?: DestinationConfig;
    timeoutConfig?: TimeoutConfig;
}
export declare const OpenTunnelRequest: S.Schema<OpenTunnelRequest>;
export interface OpenTunnelResponse {
    tunnelId?: string;
    tunnelArn?: string;
    sourceAccessToken?: string | redacted.Redacted<string>;
    destinationAccessToken?: string | redacted.Redacted<string>;
}
export declare const OpenTunnelResponse: S.Schema<OpenTunnelResponse>;
export type ClientMode = "SOURCE" | "DESTINATION" | "ALL" | (string & {});
export declare const ClientMode: S.String;
export interface RotateTunnelAccessTokenRequest {
    tunnelId: string;
    clientMode: ClientMode;
    destinationConfig?: DestinationConfig;
}
export declare const RotateTunnelAccessTokenRequest: S.Schema<RotateTunnelAccessTokenRequest>;
export interface RotateTunnelAccessTokenResponse {
    tunnelArn?: string;
    sourceAccessToken?: string | redacted.Redacted<string>;
    destinationAccessToken?: string | redacted.Redacted<string>;
}
export declare const RotateTunnelAccessTokenResponse: S.Schema<RotateTunnelAccessTokenResponse>;
export interface TagResourceRequest {
    resourceArn: string;
    tags: Tag[];
}
export declare const TagResourceRequest: S.Schema<TagResourceRequest>;
export interface TagResourceResponse {
}
export declare const TagResourceResponse: S.Schema<TagResourceResponse>;
export type TagKeyList = string[];
export declare const TagKeyList: S.$Array<S.String>;
export interface UntagResourceRequest {
    resourceArn: string;
    tagKeys: string[];
}
export declare const UntagResourceRequest: S.Schema<UntagResourceRequest>;
export interface UntagResourceResponse {
}
export declare const UntagResourceResponse: S.Schema<UntagResourceResponse>;
declare const ResourceNotFoundException_base: S.Class<ResourceNotFoundException, S.TaggedStruct<"ResourceNotFoundException", {
    readonly message: S.optional<S.String>;
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
    "@distilled.cloud/error/categories": {
        BadRequestError: true;
    };
});
export declare class ResourceNotFoundException extends ResourceNotFoundException_base {
}
declare const LimitExceededException_base: S.Class<LimitExceededException, S.TaggedStruct<"LimitExceededException", {
    readonly message: S.optional<S.String>;
}>, import("effect/Cause").YieldableError> & (new (...args: any[]) => {
    "@distilled.cloud/error/categories": {
        AuthError: true;
    };
});
export declare class LimitExceededException extends LimitExceededException_base {
}
export type CloseTunnelError = ResourceNotFoundException | CommonErrors;
/**
 * Closes a tunnel identified by the unique tunnel id. When a `CloseTunnel`
 * request is received, we close the WebSocket connections between the client and proxy
 * server so no data can be transmitted.
 *
 * Requires permission to access the CloseTunnel action.
 */
export declare const closeTunnel: API.OperationMethod<CloseTunnelRequest, CloseTunnelResponse, CloseTunnelError, Credentials | Region | HttpClient.HttpClient>;
export type DescribeTunnelError = ResourceNotFoundException | CommonErrors;
/**
 * Gets information about a tunnel identified by the unique tunnel id.
 *
 * Requires permission to access the DescribeTunnel action.
 */
export declare const describeTunnel: API.OperationMethod<DescribeTunnelRequest, DescribeTunnelResponse, DescribeTunnelError, Credentials | Region | HttpClient.HttpClient>;
export type ListTagsForResourceError = ResourceNotFoundException | CommonErrors;
/**
 * Lists the tags for the specified resource.
 */
export declare const listTagsForResource: API.OperationMethod<ListTagsForResourceRequest, ListTagsForResourceResponse, ListTagsForResourceError, Credentials | Region | HttpClient.HttpClient>;
export type ListTunnelsError = CommonErrors;
/**
 * List all tunnels for an Amazon Web Services account. Tunnels are listed by creation time in
 * descending order, newer tunnels will be listed before older tunnels.
 *
 * Requires permission to access the ListTunnels action.
 */
export declare const listTunnels: API.OperationMethod<ListTunnelsRequest, ListTunnelsResponse, ListTunnelsError, Credentials | Region | HttpClient.HttpClient> & {
    pages: (input: ListTunnelsRequest) => stream.Stream<ListTunnelsResponse, ListTunnelsError, Credentials | Region | HttpClient.HttpClient>;
    items: (input: ListTunnelsRequest) => stream.Stream<unknown, ListTunnelsError, Credentials | Region | HttpClient.HttpClient>;
};
export type OpenTunnelError = LimitExceededException | CommonErrors;
/**
 * Creates a new tunnel, and returns two client access tokens for clients to use to
 * connect to the IoT Secure Tunneling proxy server.
 *
 * Requires permission to access the OpenTunnel action.
 */
export declare const openTunnel: API.OperationMethod<OpenTunnelRequest, OpenTunnelResponse, OpenTunnelError, Credentials | Region | HttpClient.HttpClient>;
export type RotateTunnelAccessTokenError = ResourceNotFoundException | CommonErrors;
/**
 * Revokes the current client access token (CAT) and returns new CAT for clients to
 * use when reconnecting to secure tunneling to access the same tunnel.
 *
 * Requires permission to access the RotateTunnelAccessToken action.
 *
 * Rotating the CAT doesn't extend the tunnel duration. For example, say the tunnel
 * duration is 12 hours and the tunnel has already been open for 4 hours. When you
 * rotate the access tokens, the new tokens that are generated can only be used for the
 * remaining 8 hours.
 */
export declare const rotateTunnelAccessToken: API.OperationMethod<RotateTunnelAccessTokenRequest, RotateTunnelAccessTokenResponse, RotateTunnelAccessTokenError, Credentials | Region | HttpClient.HttpClient>;
export type TagResourceError = ResourceNotFoundException | CommonErrors;
/**
 * A resource tag.
 */
export declare const tagResource: API.OperationMethod<TagResourceRequest, TagResourceResponse, TagResourceError, Credentials | Region | HttpClient.HttpClient>;
export type UntagResourceError = ResourceNotFoundException | CommonErrors;
/**
 * Removes a tag from a resource.
 */
export declare const untagResource: API.OperationMethod<UntagResourceRequest, UntagResourceResponse, UntagResourceError, Credentials | Region | HttpClient.HttpClient>;
export {};
//# sourceMappingURL=iotsecuretunneling.d.ts.map