/* eslint-disable @typescript-eslint/no-empty-object-type */
import * as z from "zod";
export const isDefinedNonNullAny = (v) => v !== undefined && v !== null;
export const definedNonNullAnySchema = z
    .any()
    .refine((v) => isDefinedNonNullAny(v));
export const ServiceStatusSchema = z.enum([
    "ACTIVE",
    "BILLING_ISSUE",
    "PROVISIONING",
    "SUSPENDED",
]);
export const VetraCloudEnvironmentServiceTypeSchema = z.enum([
    "CONNECT",
    "FUSION",
    "SWITCHBOARD",
]);
export const VetraCloudEnvironmentStatusSchema = z.enum([
    "ARCHIVED",
    "CHANGES_APPROVED",
    "CHANGES_PENDING",
    "CHANGES_PUSHED",
    "DEPLOYING",
    "DEPLOYMENt_FAILED",
    "DESTROYED",
    "DRAFT",
    "READY",
    "STOPPED",
    "TERMINATING",
]);
export function AddPackageInputSchema() {
    return z.object({
        packageName: z.string(),
        registry: z.url().nullish(),
        version: z.string().nullish(),
    });
}
export function ApproveChangesInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function ArchiveInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function DisableServiceInputSchema() {
    return z.object({
        type: VetraCloudEnvironmentServiceTypeSchema,
    });
}
export function DnsRecordSchema() {
    return z.object({
        __typename: z.literal("DnsRecord").optional(),
        host: z.string(),
        type: z.string(),
        value: z.string(),
    });
}
export function DnsRecordInputSchema() {
    return z.object({
        host: z.string(),
        type: z.string(),
        value: z.string(),
    });
}
export function EnableServiceInputSchema() {
    return z.object({
        prefix: z.string(),
        type: VetraCloudEnvironmentServiceTypeSchema,
    });
}
export function InitializeInputSchema() {
    return z.object({
        defaultPackageRegistry: z.url().nullish(),
        genericBaseDomain: z.string(),
        genericSubdomain: z.string(),
    });
}
export function MarkChangesPushedInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function MarkDeploymentStartedInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function MarkDestroyedInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function RemovePackageInputSchema() {
    return z.object({
        packageName: z.string(),
    });
}
export function ReportDeploymentFailedInputSchema() {
    return z.object({
        code: z.string(),
        message: z.string(),
    });
}
export function ReportDeploymentSucceededInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function SetCustomDomainInputSchema() {
    return z.object({
        domain: z.string().nullish(),
        enabled: z.boolean(),
    });
}
export function SetDefaultPackageRegistryInputSchema() {
    return z.object({
        defaultPackageRegistry: z.url(),
    });
}
export function SetDnsRecordsInputSchema() {
    return z.object({
        records: z.array(z.lazy(() => DnsRecordInputSchema())),
    });
}
export function SetGenericSubdomainInputSchema() {
    return z.object({
        genericSubdomain: z.string(),
    });
}
export function SetLabelInputSchema() {
    return z.object({
        label: z.string(),
    });
}
export function SetPackageVersionInputSchema() {
    return z.object({
        packageName: z.string(),
        version: z.string(),
    });
}
export function SetServiceStatusInputSchema() {
    return z.object({
        status: ServiceStatusSchema,
        type: VetraCloudEnvironmentServiceTypeSchema,
        url: z.string().nullish(),
    });
}
export function SetServiceVersionInputSchema() {
    return z.object({
        type: VetraCloudEnvironmentServiceTypeSchema,
        version: z.string(),
    });
}
export function TerminateEnvironmentInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function ToggleServiceInputSchema() {
    return z.object({
        type: VetraCloudEnvironmentServiceTypeSchema,
    });
}
export function UnarchiveInputSchema() {
    return z.object({
        _placeholder: z.string().nullish(),
    });
}
export function UpdateServicePrefixInputSchema() {
    return z.object({
        prefix: z.string(),
        type: VetraCloudEnvironmentServiceTypeSchema,
    });
}
export function VetraCloudEnvironmentServiceSchema() {
    return z.object({
        __typename: z.literal("VetraCloudEnvironmentService").optional(),
        enabled: z.boolean(),
        prefix: z.string(),
        status: ServiceStatusSchema,
        type: VetraCloudEnvironmentServiceTypeSchema,
        url: z.string().nullish(),
        version: z.string().nullish(),
    });
}
export function VetraCloudEnvironmentStateSchema() {
    return z.object({
        __typename: z.literal("VetraCloudEnvironmentState").optional(),
        customDomain: z.lazy(() => VetraCustomDomainSchema().nullish()),
        defaultPackageRegistry: z.url().nullish(),
        genericBaseDomain: z.string().nullish(),
        genericSubdomain: z.string().nullish(),
        label: z.string().nullish(),
        packages: z.array(z.lazy(() => VetraCloudPackageSchema())),
        services: z.array(z.lazy(() => VetraCloudEnvironmentServiceSchema())),
        status: VetraCloudEnvironmentStatusSchema,
    });
}
export function VetraCloudPackageSchema() {
    return z.object({
        __typename: z.literal("VetraCloudPackage").optional(),
        name: z.string(),
        registry: z.url(),
        version: z.string().nullish(),
    });
}
export function VetraCustomDomainSchema() {
    return z.object({
        __typename: z.literal("VetraCustomDomain").optional(),
        dnsRecords: z.array(z.lazy(() => DnsRecordSchema())),
        domain: z.string().nullish(),
        enabled: z.boolean(),
    });
}
