/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
import { Pagination$inboundSchema, Pagination$outboundSchema, } from "./pagination.js";
/**
 * Filters only production domains when set to `true`.
 */
export const Production = {
    True: "true",
    False: "false",
};
/**
 * Filters on the target of the domain. Can be either \"production\", \"preview\"
 */
export const QueryParamTarget = {
    Production: "production",
    Preview: "preview",
};
/**
 * Excludes redirect project domains when \"false\". Includes redirect project domains when \"true\" (default).
 */
export const Redirects = {
    True: "true",
    False: "false",
};
/**
 * Filters domains based on their verification status.
 */
export const Verified = {
    True: "true",
    False: "false",
};
/**
 * Domains sort order by createdAt
 */
export const Order = {
    Asc: "ASC",
    Desc: "DESC",
};
/** @internal */
export const Production$inboundSchema = z
    .nativeEnum(Production);
/** @internal */
export const Production$outboundSchema = Production$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Production$;
(function (Production$) {
    /** @deprecated use `Production$inboundSchema` instead. */
    Production$.inboundSchema = Production$inboundSchema;
    /** @deprecated use `Production$outboundSchema` instead. */
    Production$.outboundSchema = Production$outboundSchema;
})(Production$ || (Production$ = {}));
/** @internal */
export const QueryParamTarget$inboundSchema = z.nativeEnum(QueryParamTarget);
/** @internal */
export const QueryParamTarget$outboundSchema = QueryParamTarget$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var QueryParamTarget$;
(function (QueryParamTarget$) {
    /** @deprecated use `QueryParamTarget$inboundSchema` instead. */
    QueryParamTarget$.inboundSchema = QueryParamTarget$inboundSchema;
    /** @deprecated use `QueryParamTarget$outboundSchema` instead. */
    QueryParamTarget$.outboundSchema = QueryParamTarget$outboundSchema;
})(QueryParamTarget$ || (QueryParamTarget$ = {}));
/** @internal */
export const Redirects$inboundSchema = z
    .nativeEnum(Redirects);
/** @internal */
export const Redirects$outboundSchema = Redirects$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Redirects$;
(function (Redirects$) {
    /** @deprecated use `Redirects$inboundSchema` instead. */
    Redirects$.inboundSchema = Redirects$inboundSchema;
    /** @deprecated use `Redirects$outboundSchema` instead. */
    Redirects$.outboundSchema = Redirects$outboundSchema;
})(Redirects$ || (Redirects$ = {}));
/** @internal */
export const Verified$inboundSchema = z
    .nativeEnum(Verified);
/** @internal */
export const Verified$outboundSchema = Verified$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Verified$;
(function (Verified$) {
    /** @deprecated use `Verified$inboundSchema` instead. */
    Verified$.inboundSchema = Verified$inboundSchema;
    /** @deprecated use `Verified$outboundSchema` instead. */
    Verified$.outboundSchema = Verified$outboundSchema;
})(Verified$ || (Verified$ = {}));
/** @internal */
export const Order$inboundSchema = z.nativeEnum(Order);
/** @internal */
export const Order$outboundSchema = Order$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Order$;
(function (Order$) {
    /** @deprecated use `Order$inboundSchema` instead. */
    Order$.inboundSchema = Order$inboundSchema;
    /** @deprecated use `Order$outboundSchema` instead. */
    Order$.outboundSchema = Order$outboundSchema;
})(Order$ || (Order$ = {}));
/** @internal */
export const GetProjectDomainsRequest$inboundSchema = z.object({
    idOrName: z.string(),
    production: Production$inboundSchema.default("false"),
    target: QueryParamTarget$inboundSchema.optional(),
    gitBranch: z.string().optional(),
    redirects: Redirects$inboundSchema.default("true"),
    redirect: z.string().optional(),
    verified: Verified$inboundSchema.optional(),
    limit: z.number().optional(),
    since: z.number().optional(),
    until: z.number().optional(),
    order: Order$inboundSchema.default("DESC"),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetProjectDomainsRequest$outboundSchema = z.object({
    idOrName: z.string(),
    production: Production$outboundSchema.default("false"),
    target: QueryParamTarget$outboundSchema.optional(),
    gitBranch: z.string().optional(),
    redirects: Redirects$outboundSchema.default("true"),
    redirect: z.string().optional(),
    verified: Verified$outboundSchema.optional(),
    limit: z.number().optional(),
    since: z.number().optional(),
    until: z.number().optional(),
    order: Order$outboundSchema.default("DESC"),
    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 GetProjectDomainsRequest$;
(function (GetProjectDomainsRequest$) {
    /** @deprecated use `GetProjectDomainsRequest$inboundSchema` instead. */
    GetProjectDomainsRequest$.inboundSchema = GetProjectDomainsRequest$inboundSchema;
    /** @deprecated use `GetProjectDomainsRequest$outboundSchema` instead. */
    GetProjectDomainsRequest$.outboundSchema = GetProjectDomainsRequest$outboundSchema;
})(GetProjectDomainsRequest$ || (GetProjectDomainsRequest$ = {}));
export function getProjectDomainsRequestToJSON(getProjectDomainsRequest) {
    return JSON.stringify(GetProjectDomainsRequest$outboundSchema.parse(getProjectDomainsRequest));
}
export function getProjectDomainsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectDomainsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectDomainsRequest' from JSON`);
}
/** @internal */
export const GetProjectDomainsVerification$inboundSchema = z.object({
    type: z.string(),
    domain: z.string(),
    value: z.string(),
    reason: z.string(),
});
/** @internal */
export const GetProjectDomainsVerification$outboundSchema = z.object({
    type: z.string(),
    domain: z.string(),
    value: z.string(),
    reason: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectDomainsVerification$;
(function (GetProjectDomainsVerification$) {
    /** @deprecated use `GetProjectDomainsVerification$inboundSchema` instead. */
    GetProjectDomainsVerification$.inboundSchema = GetProjectDomainsVerification$inboundSchema;
    /** @deprecated use `GetProjectDomainsVerification$outboundSchema` instead. */
    GetProjectDomainsVerification$.outboundSchema = GetProjectDomainsVerification$outboundSchema;
})(GetProjectDomainsVerification$ || (GetProjectDomainsVerification$ = {}));
export function getProjectDomainsVerificationToJSON(getProjectDomainsVerification) {
    return JSON.stringify(GetProjectDomainsVerification$outboundSchema.parse(getProjectDomainsVerification));
}
export function getProjectDomainsVerificationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectDomainsVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectDomainsVerification' from JSON`);
}
/** @internal */
export const GetProjectDomainsDomains$inboundSchema = z.object({
    name: z.string(),
    apexName: z.string(),
    projectId: z.string(),
    redirect: z.nullable(z.string()).optional(),
    redirectStatusCode: z.nullable(z.number()).optional(),
    gitBranch: z.nullable(z.string()).optional(),
    customEnvironmentId: z.nullable(z.string()).optional(),
    updatedAt: z.number().optional(),
    createdAt: z.number().optional(),
    verified: z.boolean(),
    verification: z.array(z.lazy(() => GetProjectDomainsVerification$inboundSchema)).optional(),
});
/** @internal */
export const GetProjectDomainsDomains$outboundSchema = z.object({
    name: z.string(),
    apexName: z.string(),
    projectId: z.string(),
    redirect: z.nullable(z.string()).optional(),
    redirectStatusCode: z.nullable(z.number()).optional(),
    gitBranch: z.nullable(z.string()).optional(),
    customEnvironmentId: z.nullable(z.string()).optional(),
    updatedAt: z.number().optional(),
    createdAt: z.number().optional(),
    verified: z.boolean(),
    verification: z.array(z.lazy(() => GetProjectDomainsVerification$outboundSchema)).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectDomainsDomains$;
(function (GetProjectDomainsDomains$) {
    /** @deprecated use `GetProjectDomainsDomains$inboundSchema` instead. */
    GetProjectDomainsDomains$.inboundSchema = GetProjectDomainsDomains$inboundSchema;
    /** @deprecated use `GetProjectDomainsDomains$outboundSchema` instead. */
    GetProjectDomainsDomains$.outboundSchema = GetProjectDomainsDomains$outboundSchema;
})(GetProjectDomainsDomains$ || (GetProjectDomainsDomains$ = {}));
export function getProjectDomainsDomainsToJSON(getProjectDomainsDomains) {
    return JSON.stringify(GetProjectDomainsDomains$outboundSchema.parse(getProjectDomainsDomains));
}
export function getProjectDomainsDomainsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectDomainsDomains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectDomainsDomains' from JSON`);
}
/** @internal */
export const GetProjectDomainsResponseBody$inboundSchema = z.object({
    domains: z.array(z.lazy(() => GetProjectDomainsDomains$inboundSchema)),
    pagination: Pagination$inboundSchema,
});
/** @internal */
export const GetProjectDomainsResponseBody$outboundSchema = z.object({
    domains: z.array(z.lazy(() => GetProjectDomainsDomains$outboundSchema)),
    pagination: Pagination$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectDomainsResponseBody$;
(function (GetProjectDomainsResponseBody$) {
    /** @deprecated use `GetProjectDomainsResponseBody$inboundSchema` instead. */
    GetProjectDomainsResponseBody$.inboundSchema = GetProjectDomainsResponseBody$inboundSchema;
    /** @deprecated use `GetProjectDomainsResponseBody$outboundSchema` instead. */
    GetProjectDomainsResponseBody$.outboundSchema = GetProjectDomainsResponseBody$outboundSchema;
})(GetProjectDomainsResponseBody$ || (GetProjectDomainsResponseBody$ = {}));
export function getProjectDomainsResponseBodyToJSON(getProjectDomainsResponseBody) {
    return JSON.stringify(GetProjectDomainsResponseBody$outboundSchema.parse(getProjectDomainsResponseBody));
}
export function getProjectDomainsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectDomainsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectDomainsResponseBody' from JSON`);
}
//# sourceMappingURL=getprojectdomainsop.js.map