/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
/**
 * When true, the response will only include the nameservers assigned directly to the specified domain. When false and there are no nameservers assigned directly to the specified domain, the response will include the nameservers of the domain's parent zone.
 */
export const Strict = {
    True: "true",
    False: "false",
};
/**
 * How we see the domain's configuration. - `CNAME`: Domain has a CNAME pointing to Vercel. - `A`: Domain's A record is resolving to Vercel. - `http`: Domain is resolving to Vercel but may be behind a Proxy. - `dns-01`: Domain is not resolving to Vercel but dns-01 challenge is enabled. - `null`: Domain is not resolving to Vercel.
 */
export const ConfiguredBy = {
    Cname: "CNAME",
    A: "A",
    Http: "http",
    Dns01: "dns-01",
};
/**
 * Which challenge types the domain can use for issuing certs.
 */
export const AcceptedChallenges = {
    Dns01: "dns-01",
    Http01: "http-01",
};
/** @internal */
export const Strict$inboundSchema = z
    .nativeEnum(Strict);
/** @internal */
export const Strict$outboundSchema = Strict$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Strict$;
(function (Strict$) {
    /** @deprecated use `Strict$inboundSchema` instead. */
    Strict$.inboundSchema = Strict$inboundSchema;
    /** @deprecated use `Strict$outboundSchema` instead. */
    Strict$.outboundSchema = Strict$outboundSchema;
})(Strict$ || (Strict$ = {}));
/** @internal */
export const GetDomainConfigRequest$inboundSchema = z.object({
    domain: z.string(),
    projectIdOrName: z.string().optional(),
    strict: Strict$inboundSchema.optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetDomainConfigRequest$outboundSchema = z.object({
    domain: z.string(),
    projectIdOrName: z.string().optional(),
    strict: Strict$outboundSchema.optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetDomainConfigRequest$;
(function (GetDomainConfigRequest$) {
    /** @deprecated use `GetDomainConfigRequest$inboundSchema` instead. */
    GetDomainConfigRequest$.inboundSchema = GetDomainConfigRequest$inboundSchema;
    /** @deprecated use `GetDomainConfigRequest$outboundSchema` instead. */
    GetDomainConfigRequest$.outboundSchema = GetDomainConfigRequest$outboundSchema;
})(GetDomainConfigRequest$ || (GetDomainConfigRequest$ = {}));
export function getDomainConfigRequestToJSON(getDomainConfigRequest) {
    return JSON.stringify(GetDomainConfigRequest$outboundSchema.parse(getDomainConfigRequest));
}
export function getDomainConfigRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainConfigRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainConfigRequest' from JSON`);
}
/** @internal */
export const ConfiguredBy$inboundSchema = z.nativeEnum(ConfiguredBy);
/** @internal */
export const ConfiguredBy$outboundSchema = ConfiguredBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ConfiguredBy$;
(function (ConfiguredBy$) {
    /** @deprecated use `ConfiguredBy$inboundSchema` instead. */
    ConfiguredBy$.inboundSchema = ConfiguredBy$inboundSchema;
    /** @deprecated use `ConfiguredBy$outboundSchema` instead. */
    ConfiguredBy$.outboundSchema = ConfiguredBy$outboundSchema;
})(ConfiguredBy$ || (ConfiguredBy$ = {}));
/** @internal */
export const AcceptedChallenges$inboundSchema = z.nativeEnum(AcceptedChallenges);
/** @internal */
export const AcceptedChallenges$outboundSchema = AcceptedChallenges$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AcceptedChallenges$;
(function (AcceptedChallenges$) {
    /** @deprecated use `AcceptedChallenges$inboundSchema` instead. */
    AcceptedChallenges$.inboundSchema = AcceptedChallenges$inboundSchema;
    /** @deprecated use `AcceptedChallenges$outboundSchema` instead. */
    AcceptedChallenges$.outboundSchema = AcceptedChallenges$outboundSchema;
})(AcceptedChallenges$ || (AcceptedChallenges$ = {}));
/** @internal */
export const RecommendedIPv4$inboundSchema = z.object({});
/** @internal */
export const RecommendedIPv4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RecommendedIPv4$;
(function (RecommendedIPv4$) {
    /** @deprecated use `RecommendedIPv4$inboundSchema` instead. */
    RecommendedIPv4$.inboundSchema = RecommendedIPv4$inboundSchema;
    /** @deprecated use `RecommendedIPv4$outboundSchema` instead. */
    RecommendedIPv4$.outboundSchema = RecommendedIPv4$outboundSchema;
})(RecommendedIPv4$ || (RecommendedIPv4$ = {}));
export function recommendedIPv4ToJSON(recommendedIPv4) {
    return JSON.stringify(RecommendedIPv4$outboundSchema.parse(recommendedIPv4));
}
export function recommendedIPv4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => RecommendedIPv4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecommendedIPv4' from JSON`);
}
/** @internal */
export const RecommendedCNAME$inboundSchema = z.object({});
/** @internal */
export const RecommendedCNAME$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RecommendedCNAME$;
(function (RecommendedCNAME$) {
    /** @deprecated use `RecommendedCNAME$inboundSchema` instead. */
    RecommendedCNAME$.inboundSchema = RecommendedCNAME$inboundSchema;
    /** @deprecated use `RecommendedCNAME$outboundSchema` instead. */
    RecommendedCNAME$.outboundSchema = RecommendedCNAME$outboundSchema;
})(RecommendedCNAME$ || (RecommendedCNAME$ = {}));
export function recommendedCNAMEToJSON(recommendedCNAME) {
    return JSON.stringify(RecommendedCNAME$outboundSchema.parse(recommendedCNAME));
}
export function recommendedCNAMEFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RecommendedCNAME$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecommendedCNAME' from JSON`);
}
/** @internal */
export const GetDomainConfigResponseBody$inboundSchema = z.object({
    configuredBy: z.nullable(ConfiguredBy$inboundSchema).optional(),
    acceptedChallenges: z.array(AcceptedChallenges$inboundSchema).optional(),
    recommendedIPv4: z.array(z.lazy(() => RecommendedIPv4$inboundSchema))
        .optional(),
    recommendedCNAME: z.array(z.lazy(() => RecommendedCNAME$inboundSchema))
        .optional(),
    misconfigured: z.boolean(),
});
/** @internal */
export const GetDomainConfigResponseBody$outboundSchema = z.object({
    configuredBy: z.nullable(ConfiguredBy$outboundSchema).optional(),
    acceptedChallenges: z.array(AcceptedChallenges$outboundSchema).optional(),
    recommendedIPv4: z.array(z.lazy(() => RecommendedIPv4$outboundSchema))
        .optional(),
    recommendedCNAME: z.array(z.lazy(() => RecommendedCNAME$outboundSchema))
        .optional(),
    misconfigured: z.boolean(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetDomainConfigResponseBody$;
(function (GetDomainConfigResponseBody$) {
    /** @deprecated use `GetDomainConfigResponseBody$inboundSchema` instead. */
    GetDomainConfigResponseBody$.inboundSchema = GetDomainConfigResponseBody$inboundSchema;
    /** @deprecated use `GetDomainConfigResponseBody$outboundSchema` instead. */
    GetDomainConfigResponseBody$.outboundSchema = GetDomainConfigResponseBody$outboundSchema;
})(GetDomainConfigResponseBody$ || (GetDomainConfigResponseBody$ = {}));
export function getDomainConfigResponseBodyToJSON(getDomainConfigResponseBody) {
    return JSON.stringify(GetDomainConfigResponseBody$outboundSchema.parse(getDomainConfigResponseBody));
}
export function getDomainConfigResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainConfigResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainConfigResponseBody' from JSON`);
}
//# sourceMappingURL=getdomainconfigop.js.map