/**
 * @since 1.0.0
 */
import * as Schema from "@effect/schema/Schema";
import * as Duration from "effect/Duration";
import * as Option from "effect/Option";
import * as InternetSchemas from "./InternetSchemas.js";
declare const WireguardPeer_base: Schema.Class<WireguardPeer, {
    /** The persistent keepalive interval in seconds, 0 disables it. */
    PersistentKeepaliveInterval: Schema.PropertySignature<":", Duration.Duration, never, "?:", Duration.Duration | null | undefined, never>;
    /**
     * The value for this is IP/cidr, indicating a new added allowed IP entry
     * for the previously added peer entry. If an identical value already exists
     * as part of a prior peer, the allowed IP entry will be removed from that
     * peer and added to this peer.
     */
    AllowedIPs: Schema.PropertySignature<":", readonly (InternetSchemas.CidrBlockInternal & import("effect/Brand").Brand<"CidrBlock">)[], never, "?:", readonly ({
        readonly ipv4: string;
        readonly mask: number;
    } | {
        readonly ipv6: string;
        readonly mask: number;
    } | `${string}/${number}`)[] | null, never>;
    /**
     * The value for this key is either IP:port for IPv4 or [IP]:port for IPv6,
     * indicating the endpoint of the previously added peer entry.
     */
    Endpoint: Schema.brand<Schema.union<[Schema.brand<Schema.transformOrFail<Schema.union<[Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv4">;
        port: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv4">;
        natPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
        listenPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, Schema.Schema<`${string}:${number}`, `${string}:${number}`, never>, Schema.Schema<`${string}:${number}:${number}`, `${string}:${number}:${number}`, never>]>, Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv4">;
        natPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
        listenPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, never>, "IPv4Endpoint">, Schema.brand<Schema.transformOrFail<Schema.union<[Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv6">;
        port: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv6">;
        natPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
        listenPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, Schema.Schema<`[${string}]:${number}`, `[${string}]:${number}`, never>, Schema.Schema<`[${string}]:${number}:${number}`, `[${string}]:${number}:${number}`, never>]>, Schema.struct<{
        ip: Schema.brand<Schema.Schema<string, string, never>, "IPv6">;
        natPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
        listenPort: Schema.brand<Schema.Schema<number, number, never>, "Port">;
    }>, never>, "IPv6Endpoint">]>, "Endpoint">;
    /**
     * The value for this key should be a lowercase hex-encoded public key of a
     * new peer entry.
     */
    PublicKey: Schema.brand<Schema.Schema<string, string, never>, "WireguardKey">;
    PresharedKey: Schema.PropertySignature<":", Option.Option<string & import("effect/Brand").Brand<"WireguardKey">>, never, "?:", string | null | undefined, never>;
}, {
    readonly Endpoint: (({
        readonly ip: string & import("effect/Brand").Brand<"IPv4">;
        readonly natPort: number & import("effect/Brand").Brand<"Port">;
        readonly listenPort: number & import("effect/Brand").Brand<"Port">;
    } & import("effect/Brand").Brand<"IPv4Endpoint">) | ({
        readonly ip: string & import("effect/Brand").Brand<"IPv6">;
        readonly natPort: number & import("effect/Brand").Brand<"Port">;
        readonly listenPort: number & import("effect/Brand").Brand<"Port">;
    } & import("effect/Brand").Brand<"IPv6Endpoint">)) & import("effect/Brand").Brand<"Endpoint">;
    readonly PersistentKeepaliveInterval: Duration.Duration;
    readonly AllowedIPs: readonly (InternetSchemas.CidrBlockInternal & import("effect/Brand").Brand<"CidrBlock">)[];
    readonly PublicKey: string & import("effect/Brand").Brand<"WireguardKey">;
    readonly PresharedKey: Option.Option<string & import("effect/Brand").Brand<"WireguardKey">>;
}, {
    readonly Endpoint: {
        readonly ip: string;
        readonly port: number;
    } | {
        readonly ip: string;
        readonly natPort: number;
        readonly listenPort: number;
    } | `${string}:${number}` | `${string}:${number}:${number}` | {
        readonly ip: string;
        readonly port: number;
    } | {
        readonly ip: string;
        readonly natPort: number;
        readonly listenPort: number;
    } | `[${string}]:${number}` | `[${string}]:${number}:${number}`;
    readonly PublicKey: string;
    readonly PersistentKeepaliveInterval?: Duration.Duration | null | undefined;
    readonly AllowedIPs?: readonly ({
        readonly ipv4: string;
        readonly mask: number;
    } | {
        readonly ipv6: string;
        readonly mask: number;
    } | `${string}/${number}`)[] | null;
    readonly PresharedKey?: string | null | undefined;
}, never, {
    readonly Endpoint: (({
        readonly ip: string & import("effect/Brand").Brand<"IPv4">;
        readonly natPort: number & import("effect/Brand").Brand<"Port">;
        readonly listenPort: number & import("effect/Brand").Brand<"Port">;
    } & import("effect/Brand").Brand<"IPv4Endpoint">) | ({
        readonly ip: string & import("effect/Brand").Brand<"IPv6">;
        readonly natPort: number & import("effect/Brand").Brand<"Port">;
        readonly listenPort: number & import("effect/Brand").Brand<"Port">;
    } & import("effect/Brand").Brand<"IPv6Endpoint">)) & import("effect/Brand").Brand<"Endpoint">;
    readonly PersistentKeepaliveInterval: Duration.Duration;
    readonly AllowedIPs: readonly (InternetSchemas.CidrBlockInternal & import("effect/Brand").Brand<"CidrBlock">)[];
    readonly PublicKey: string & import("effect/Brand").Brand<"WireguardKey">;
    readonly PresharedKey: Option.Option<string & import("effect/Brand").Brand<"WireguardKey">>;
}, {}, {}>;
/**
 * A wireguard peer configuration.
 *
 * @example
 * import * as Schema from "@effect/schema/Schema"
 * import * as Duration from "effect/Duration"
 * import * as Option from "effect/Option"
 * import * as InternetSchemas from "the-wireguard-effect/InternetSchemas"
 * import * as WireguardKey from "the-wireguard-effect/WireguardKey"
 *
 * import { WireguardPeer } from "the-wireguard-effect/WireguardPeer"
 *
 * const { publicKey, privateKey: _privateKey } = WireguardKey.generateKeyPair()
 *
 * // WireguardPeer
 * const peerDirectInstantiation = new WireguardPeer({
 *      PublicKey: publicKey,
 *      AllowedIPs: [
 *          InternetSchemas.CidrBlock({
 *              ipv4: InternetSchemas.IPv4("192.168.0.0"),
 *              mask: InternetSchemas.IPv4CidrMask(24),
 *          }),
 *      ],
 *      Endpoint: InternetSchemas.Endpoint(
 *          InternetSchemas.IPv4Endpoint({
 *              ip: InternetSchemas.IPv4("192.168.0.1"),
 *              natPort: InternetSchemas.Port(51820),
 *              listenPort: InternetSchemas.Port(51820),
 *          }),
 *      ),
 *      PersistentKeepaliveInterval: Duration.seconds(20),
 *      PresharedKey: Option.none(),
 * })
 *
 * // Effect.Effect<WireguardPeer, ParseResult.ParseError, never>
 * const peerSchemaInstantiation = Schema.decode(WireguardPeer)({
 *      PublicKey: publicKey,
 *      AllowedIPs: ["192.168.0.0/24"],
 *      Endpoint: "192.168.0.1:51820",
 *      PersistentKeepaliveInterval: Duration.seconds(20),
 * })
 *
 * @since 1.0.0
 * @category Datatypes
 */
export declare class WireguardPeer extends WireguardPeer_base {
}
/**
 * A wireguard peer configuration encoded in INI format.
 *
 * @see {@link WireguardPeer}
 *
 * @example
 * import * as Effect from "effect/Effect"
 * import * as Duration from "effect/Duration"
 * import * as Function from "effect/Function"
 * import * as Schema from "@effect/schema/Schema"
 * import * as WireguardKey from "the-wireguard-effect/WireguardKey"
 * import * as WireguardPeer from "the-wireguard-effect/WireguardPeer"
 *
 * const { publicKey, privateKey: _privateKey } = WireguardKey.generateKeyPair()
 *
 * const peer = Schema.decode(WireguardPeer.WireguardPeer)({
 *      PublicKey: publicKey,
 *      AllowedIPs: ["192.168.0.0/24"],
 *      Endpoint: "192.168.0.1:51820",
 *      PersistentKeepaliveInterval: Duration.seconds(20),
 * })
 *
 * const iniPeer = Function.pipe(
 *      peer,
 *      Effect.flatMap(Schema.encode(WireguardPeer.WireguardPeer)),
 *      Effect.flatMap(Schema.decode(WireguardPeer.WireguardIniPeer)),
 * )
 *
 * @since 1.0.0
 * @category Transformations
 */
export declare const WireguardIniPeer: Schema.brand<Schema.transformOrFail<typeof WireguardPeer, Schema.$string, never>, "WireguardIniPeer">;
/**
 * A wireguard peer configuration encoded in the userspace api format.
 *
 * @see {@link WireguardPeer}

 * @example
 * import * as Effect from "effect/Effect"
 * import * as Duration from "effect/Duration"
 * import * as Function from "effect/Function"
 * import * as Schema from "@effect/schema/Schema"
 * import * as WireguardKey from "the-wireguard-effect/WireguardKey"
 * import * as WireguardPeer from "the-wireguard-effect/WireguardPeer"
 *
 * const { publicKey, privateKey: _privateKey } = WireguardKey.generateKeyPair()
 *
 * const peer = Schema.decode(WireguardPeer.WireguardPeer)({
 *      PublicKey: publicKey,
 *      AllowedIPs: ["192.168.0.0/24"],
 *      Endpoint: "192.168.0.1:51820",
 *      PersistentKeepaliveInterval: Duration.seconds(20),
 * })
 *
 * const uapiPeer = Function.pipe(
 *      peer,
 *      Effect.flatMap(Schema.encode(WireguardPeer.WireguardPeer)),
 *      Effect.flatMap(Schema.decode(WireguardPeer.WireguardUapiPeer)),
 * )
 *
 * @since 1.0.0
 * @category Transformations
 */
export declare const WireguardUapiPeer: Schema.brand<Schema.transformOrFail<typeof WireguardPeer, Schema.$string, never>, "WireguardUapiPeer">;
export default WireguardPeer;
//# sourceMappingURL=WireguardPeer.d.ts.map