/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
/**
 * The type of service the domain is handled by. `external` if the DNS is externally handled, `zeit.world` if handled with Vercel, or `na` if the service is not available.
 */
export const ServiceType = {
    ZeitWorld: "zeit.world",
    External: "external",
    Na: "na",
};
/** @internal */
export const GetDomainRequest$inboundSchema = z.object({
    domain: z.string(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetDomainRequest$outboundSchema = z.object({
    domain: z.string(),
    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 GetDomainRequest$;
(function (GetDomainRequest$) {
    /** @deprecated use `GetDomainRequest$inboundSchema` instead. */
    GetDomainRequest$.inboundSchema = GetDomainRequest$inboundSchema;
    /** @deprecated use `GetDomainRequest$outboundSchema` instead. */
    GetDomainRequest$.outboundSchema = GetDomainRequest$outboundSchema;
})(GetDomainRequest$ || (GetDomainRequest$ = {}));
export function getDomainRequestToJSON(getDomainRequest) {
    return JSON.stringify(GetDomainRequest$outboundSchema.parse(getDomainRequest));
}
export function getDomainRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainRequest' from JSON`);
}
/** @internal */
export const GetDomainCreator$inboundSchema = z.object({
    username: z.string(),
    email: z.string(),
    customerId: z.nullable(z.string()).optional(),
    isDomainReseller: z.boolean().optional(),
    id: z.string(),
});
/** @internal */
export const GetDomainCreator$outboundSchema = z.object({
    username: z.string(),
    email: z.string(),
    customerId: z.nullable(z.string()).optional(),
    isDomainReseller: z.boolean().optional(),
    id: 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 GetDomainCreator$;
(function (GetDomainCreator$) {
    /** @deprecated use `GetDomainCreator$inboundSchema` instead. */
    GetDomainCreator$.inboundSchema = GetDomainCreator$inboundSchema;
    /** @deprecated use `GetDomainCreator$outboundSchema` instead. */
    GetDomainCreator$.outboundSchema = GetDomainCreator$outboundSchema;
})(GetDomainCreator$ || (GetDomainCreator$ = {}));
export function getDomainCreatorToJSON(getDomainCreator) {
    return JSON.stringify(GetDomainCreator$outboundSchema.parse(getDomainCreator));
}
export function getDomainCreatorFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainCreator' from JSON`);
}
/** @internal */
export const ServiceType$inboundSchema = z
    .nativeEnum(ServiceType);
/** @internal */
export const ServiceType$outboundSchema = ServiceType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ServiceType$;
(function (ServiceType$) {
    /** @deprecated use `ServiceType$inboundSchema` instead. */
    ServiceType$.inboundSchema = ServiceType$inboundSchema;
    /** @deprecated use `ServiceType$outboundSchema` instead. */
    ServiceType$.outboundSchema = ServiceType$outboundSchema;
})(ServiceType$ || (ServiceType$ = {}));
/** @internal */
export const GetDomainDomain$inboundSchema = z.object({
    suffix: z.boolean(),
    verified: z.boolean(),
    nameservers: z.array(z.string()),
    intendedNameservers: z.array(z.string()),
    customNameservers: z.array(z.string()).optional(),
    creator: z.lazy(() => GetDomainCreator$inboundSchema),
    teamId: z.nullable(z.string()),
    userId: z.string(),
    boughtAt: z.nullable(z.number()),
    createdAt: z.number(),
    expiresAt: z.nullable(z.number()),
    id: z.string(),
    name: z.string(),
    orderedAt: z.number().optional(),
    renew: z.boolean().optional(),
    serviceType: ServiceType$inboundSchema,
    transferredAt: z.nullable(z.number()).optional(),
    transferStartedAt: z.number().optional(),
});
/** @internal */
export const GetDomainDomain$outboundSchema = z.object({
    suffix: z.boolean(),
    verified: z.boolean(),
    nameservers: z.array(z.string()),
    intendedNameservers: z.array(z.string()),
    customNameservers: z.array(z.string()).optional(),
    creator: z.lazy(() => GetDomainCreator$outboundSchema),
    teamId: z.nullable(z.string()),
    userId: z.string(),
    boughtAt: z.nullable(z.number()),
    createdAt: z.number(),
    expiresAt: z.nullable(z.number()),
    id: z.string(),
    name: z.string(),
    orderedAt: z.number().optional(),
    renew: z.boolean().optional(),
    serviceType: ServiceType$outboundSchema,
    transferredAt: z.nullable(z.number()).optional(),
    transferStartedAt: z.number().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetDomainDomain$;
(function (GetDomainDomain$) {
    /** @deprecated use `GetDomainDomain$inboundSchema` instead. */
    GetDomainDomain$.inboundSchema = GetDomainDomain$inboundSchema;
    /** @deprecated use `GetDomainDomain$outboundSchema` instead. */
    GetDomainDomain$.outboundSchema = GetDomainDomain$outboundSchema;
})(GetDomainDomain$ || (GetDomainDomain$ = {}));
export function getDomainDomainToJSON(getDomainDomain) {
    return JSON.stringify(GetDomainDomain$outboundSchema.parse(getDomainDomain));
}
export function getDomainDomainFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainDomain$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainDomain' from JSON`);
}
/** @internal */
export const GetDomainResponseBody$inboundSchema = z.object({
    domain: z.lazy(() => GetDomainDomain$inboundSchema),
});
/** @internal */
export const GetDomainResponseBody$outboundSchema = z.object({
    domain: z.lazy(() => GetDomainDomain$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetDomainResponseBody$;
(function (GetDomainResponseBody$) {
    /** @deprecated use `GetDomainResponseBody$inboundSchema` instead. */
    GetDomainResponseBody$.inboundSchema = GetDomainResponseBody$inboundSchema;
    /** @deprecated use `GetDomainResponseBody$outboundSchema` instead. */
    GetDomainResponseBody$.outboundSchema = GetDomainResponseBody$outboundSchema;
})(GetDomainResponseBody$ || (GetDomainResponseBody$ = {}));
export function getDomainResponseBodyToJSON(getDomainResponseBody) {
    return JSON.stringify(GetDomainResponseBody$outboundSchema.parse(getDomainResponseBody));
}
export function getDomainResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetDomainResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDomainResponseBody' from JSON`);
}
//# sourceMappingURL=getdomainop.js.map