/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
/**
 * Status code for domain redirect
 */
export const AddProjectDomainRedirectStatusCode = {
    ThreeHundredAndOne: 301,
    ThreeHundredAndTwo: 302,
    ThreeHundredAndSeven: 307,
    ThreeHundredAndEight: 308,
};
/** @internal */
export const AddProjectDomainRedirectStatusCode$inboundSchema = z.nativeEnum(AddProjectDomainRedirectStatusCode);
/** @internal */
export const AddProjectDomainRedirectStatusCode$outboundSchema = AddProjectDomainRedirectStatusCode$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AddProjectDomainRedirectStatusCode$;
(function (AddProjectDomainRedirectStatusCode$) {
    /** @deprecated use `AddProjectDomainRedirectStatusCode$inboundSchema` instead. */
    AddProjectDomainRedirectStatusCode$.inboundSchema = AddProjectDomainRedirectStatusCode$inboundSchema;
    /** @deprecated use `AddProjectDomainRedirectStatusCode$outboundSchema` instead. */
    AddProjectDomainRedirectStatusCode$.outboundSchema = AddProjectDomainRedirectStatusCode$outboundSchema;
})(AddProjectDomainRedirectStatusCode$ || (AddProjectDomainRedirectStatusCode$ = {}));
/** @internal */
export const AddProjectDomainRequestBody$inboundSchema = z.object({
    name: z.string(),
    gitBranch: z.nullable(z.string()).optional(),
    redirect: z.nullable(z.string()).optional(),
    redirectStatusCode: z.nullable(AddProjectDomainRedirectStatusCode$inboundSchema).optional(),
});
/** @internal */
export const AddProjectDomainRequestBody$outboundSchema = z.object({
    name: z.string(),
    gitBranch: z.nullable(z.string()).optional(),
    redirect: z.nullable(z.string()).optional(),
    redirectStatusCode: z.nullable(AddProjectDomainRedirectStatusCode$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 AddProjectDomainRequestBody$;
(function (AddProjectDomainRequestBody$) {
    /** @deprecated use `AddProjectDomainRequestBody$inboundSchema` instead. */
    AddProjectDomainRequestBody$.inboundSchema = AddProjectDomainRequestBody$inboundSchema;
    /** @deprecated use `AddProjectDomainRequestBody$outboundSchema` instead. */
    AddProjectDomainRequestBody$.outboundSchema = AddProjectDomainRequestBody$outboundSchema;
})(AddProjectDomainRequestBody$ || (AddProjectDomainRequestBody$ = {}));
export function addProjectDomainRequestBodyToJSON(addProjectDomainRequestBody) {
    return JSON.stringify(AddProjectDomainRequestBody$outboundSchema.parse(addProjectDomainRequestBody));
}
export function addProjectDomainRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AddProjectDomainRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AddProjectDomainRequestBody' from JSON`);
}
/** @internal */
export const AddProjectDomainRequest$inboundSchema = z.object({
    idOrName: z.string(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
    RequestBody: z.lazy(() => AddProjectDomainRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const AddProjectDomainRequest$outboundSchema = z.object({
    idOrName: z.string(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
    requestBody: z.lazy(() => AddProjectDomainRequestBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AddProjectDomainRequest$;
(function (AddProjectDomainRequest$) {
    /** @deprecated use `AddProjectDomainRequest$inboundSchema` instead. */
    AddProjectDomainRequest$.inboundSchema = AddProjectDomainRequest$inboundSchema;
    /** @deprecated use `AddProjectDomainRequest$outboundSchema` instead. */
    AddProjectDomainRequest$.outboundSchema = AddProjectDomainRequest$outboundSchema;
})(AddProjectDomainRequest$ || (AddProjectDomainRequest$ = {}));
export function addProjectDomainRequestToJSON(addProjectDomainRequest) {
    return JSON.stringify(AddProjectDomainRequest$outboundSchema.parse(addProjectDomainRequest));
}
export function addProjectDomainRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AddProjectDomainRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AddProjectDomainRequest' from JSON`);
}
/** @internal */
export const AddProjectDomainVerification$inboundSchema = z.object({
    type: z.string(),
    domain: z.string(),
    value: z.string(),
    reason: z.string(),
});
/** @internal */
export const AddProjectDomainVerification$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 AddProjectDomainVerification$;
(function (AddProjectDomainVerification$) {
    /** @deprecated use `AddProjectDomainVerification$inboundSchema` instead. */
    AddProjectDomainVerification$.inboundSchema = AddProjectDomainVerification$inboundSchema;
    /** @deprecated use `AddProjectDomainVerification$outboundSchema` instead. */
    AddProjectDomainVerification$.outboundSchema = AddProjectDomainVerification$outboundSchema;
})(AddProjectDomainVerification$ || (AddProjectDomainVerification$ = {}));
export function addProjectDomainVerificationToJSON(addProjectDomainVerification) {
    return JSON.stringify(AddProjectDomainVerification$outboundSchema.parse(addProjectDomainVerification));
}
export function addProjectDomainVerificationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AddProjectDomainVerification$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AddProjectDomainVerification' from JSON`);
}
/** @internal */
export const AddProjectDomainResponseBody$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(() => AddProjectDomainVerification$inboundSchema)).optional(),
});
/** @internal */
export const AddProjectDomainResponseBody$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(() => AddProjectDomainVerification$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 AddProjectDomainResponseBody$;
(function (AddProjectDomainResponseBody$) {
    /** @deprecated use `AddProjectDomainResponseBody$inboundSchema` instead. */
    AddProjectDomainResponseBody$.inboundSchema = AddProjectDomainResponseBody$inboundSchema;
    /** @deprecated use `AddProjectDomainResponseBody$outboundSchema` instead. */
    AddProjectDomainResponseBody$.outboundSchema = AddProjectDomainResponseBody$outboundSchema;
})(AddProjectDomainResponseBody$ || (AddProjectDomainResponseBody$ = {}));
export function addProjectDomainResponseBodyToJSON(addProjectDomainResponseBody) {
    return JSON.stringify(AddProjectDomainResponseBody$outboundSchema.parse(addProjectDomainResponseBody));
}
export function addProjectDomainResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AddProjectDomainResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AddProjectDomainResponseBody' from JSON`);
}
//# sourceMappingURL=addprojectdomainop.js.map