/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
export const GetAllLogDrainsResponseBodyFramework = {
    Blitzjs: "blitzjs",
    Nextjs: "nextjs",
    Gatsby: "gatsby",
    Remix: "remix",
    ReactRouter: "react-router",
    Astro: "astro",
    Hexo: "hexo",
    Eleventy: "eleventy",
    Docusaurus2: "docusaurus-2",
    Docusaurus: "docusaurus",
    Preact: "preact",
    Solidstart1: "solidstart-1",
    Solidstart: "solidstart",
    Dojo: "dojo",
    Ember: "ember",
    Vue: "vue",
    Scully: "scully",
    IonicAngular: "ionic-angular",
    Angular: "angular",
    Polymer: "polymer",
    Svelte: "svelte",
    Sveltekit: "sveltekit",
    Sveltekit1: "sveltekit-1",
    IonicReact: "ionic-react",
    CreateReactApp: "create-react-app",
    Gridsome: "gridsome",
    Umijs: "umijs",
    Sapper: "sapper",
    Saber: "saber",
    Stencil: "stencil",
    Nuxtjs: "nuxtjs",
    Redwoodjs: "redwoodjs",
    Hugo: "hugo",
    Jekyll: "jekyll",
    Brunch: "brunch",
    Middleman: "middleman",
    Zola: "zola",
    Hydrogen: "hydrogen",
    Vite: "vite",
    TanstackStart: "tanstack-start",
    Vitepress: "vitepress",
    Vuepress: "vuepress",
    Parcel: "parcel",
    Fastapi: "fastapi",
    Flask: "flask",
    Fasthtml: "fasthtml",
    SanityV3: "sanity-v3",
    Sanity: "sanity",
    Storybook: "storybook",
    Nitro: "nitro",
    Hono: "hono",
    Express: "express",
    H3: "h3",
    Nestjs: "nestjs",
    Elysia: "elysia",
    Fastify: "fastify",
    Xmcp: "xmcp",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type = {
    Internal: "internal",
};
export const GetAllLogDrainsDeliveryTarget = {
    VercelOtelTracesDb: "vercel-otel-traces-db",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType = {
    Clickhouse: "clickhouse",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType = {
    Otlphttp: "otlphttp",
};
export const GetAllLogDrainsDeliveryLogDrainsResponseEncoding = {
    Json: "json",
    Proto: "proto",
};
export const GetAllLogDrainsSecretLogDrainsResponseKind = {
    IntegrationSecret: "INTEGRATION_SECRET",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200Type = {
    Http: "http",
};
export const GetAllLogDrainsDeliveryLogDrainsEncoding = {
    Json: "json",
    Ndjson: "ndjson",
};
export const GetAllLogDrainsDeliveryLogDrainsCompression = {
    Gzip: "gzip",
    None: "none",
};
export const GetAllLogDrainsSecretLogDrainsKind = {
    IntegrationSecret: "INTEGRATION_SECRET",
};
export const GetAllLogDrainsDrainsType = {
    HeadSampling: "head_sampling",
};
export const GetAllLogDrainsDrainsEnv = {
    Production: "production",
    Preview: "preview",
};
export const GetAllLogDrainsDrainsStatus = {
    Enabled: "enabled",
    Disabled: "disabled",
    Errored: "errored",
};
export const GetAllLogDrainsDrainsLogDrainsDisabledReason = {
    DisabledByOwner: "disabled-by-owner",
    FeatureNotAvailable: "feature-not-available",
    AccountPlanDowngrade: "account-plan-downgrade",
    DisabledByAdmin: "disabled-by-admin",
};
export const GetAllLogDrainsSourceLogDrainsKind = {
    Integration: "integration",
};
export const GetAllLogDrainsSourceKind = {
    SelfServed: "self-served",
};
export const GetAllLogDrainsFilterV2LogDrainsVersion = {
    V2: "v2",
};
export const GetAllLogDrainsFilterLogDrainsResponseType = {
    Odata: "odata",
};
export const GetAllLogDrainsFilterLogDrainsType = {
    Basic: "basic",
};
export const GetAllLogDrainsFilterLogDrainsSources = {
    Build: "build",
    Edge: "edge",
    Lambda: "lambda",
    Static: "static",
    External: "external",
    Firewall: "firewall",
    Redirect: "redirect",
};
export const GetAllLogDrainsFilterLogDrainsEnvironments = {
    Production: "production",
    Preview: "preview",
};
export const GetAllLogDrainsFilterV2Version = {
    V1: "v1",
};
export const GetAllLogDrainsProjectAccessLogDrainsAccess = {
    Some: "some",
};
export const GetAllLogDrainsProjectAccessAccess = {
    All: "all",
};
export const GetAllLogDrainsDeliveryLogDrainsResponseType = {
    Internal: "internal",
};
export const GetAllLogDrainsDeliveryLogDrainsTarget = {
    VercelOtelTracesDb: "vercel-otel-traces-db",
};
export const GetAllLogDrainsDeliveryLogDrainsType = {
    Clickhouse: "clickhouse",
};
export const GetAllLogDrainsDeliveryType = {
    Otlphttp: "otlphttp",
};
export const GetAllLogDrainsDeliveryEncoding = {
    Json: "json",
    Proto: "proto",
};
export const GetAllLogDrainsSecretLogDrainsResponse200Kind = {
    IntegrationSecret: "INTEGRATION_SECRET",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType = {
    Http: "http",
};
export const GetAllLogDrainsDeliveryLogDrainsResponse200Encoding = {
    Json: "json",
    Ndjson: "ndjson",
};
export const GetAllLogDrainsDeliveryCompression = {
    Gzip: "gzip",
    None: "none",
};
export const GetAllLogDrainsSecretKind = {
    IntegrationSecret: "INTEGRATION_SECRET",
};
export const GetAllLogDrainsDrainsLogDrainsType = {
    HeadSampling: "head_sampling",
};
export const GetAllLogDrainsDrainsLogDrainsEnv = {
    Production: "production",
    Preview: "preview",
};
export const GetAllLogDrainsDrainsLogDrainsStatus = {
    Enabled: "enabled",
    Disabled: "disabled",
    Errored: "errored",
};
export const GetAllLogDrainsDrainsDisabledReason = {
    DisabledByOwner: "disabled-by-owner",
    FeatureNotAvailable: "feature-not-available",
    AccountPlanDowngrade: "account-plan-downgrade",
    DisabledByAdmin: "disabled-by-admin",
};
export const GetAllLogDrainsSourceLogDrainsResponse200Kind = {
    Integration: "integration",
};
export const GetAllLogDrainsSourceLogDrainsResponseKind = {
    SelfServed: "self-served",
};
export const GetAllLogDrainsFilterV2LogDrainsResponse200Version = {
    V2: "v2",
};
export const GetAllLogDrainsFilterType = {
    Odata: "odata",
};
export const GetAllLogDrainsFilterLogDrainsResponse200Type = {
    Basic: "basic",
};
export const GetAllLogDrainsFilterSources = {
    Build: "build",
    Edge: "edge",
    Lambda: "lambda",
    Static: "static",
    External: "external",
    Firewall: "firewall",
    Redirect: "redirect",
};
export const GetAllLogDrainsFilterEnvironments = {
    Production: "production",
    Preview: "preview",
};
export const GetAllLogDrainsFilterV2LogDrainsResponseVersion = {
    V1: "v1",
};
/** @internal */
export const GetAllLogDrainsRequest$inboundSchema = z.object({
    projectId: z.string().optional(),
    includeMetadata: z.boolean().default(false),
    projectIdOrName: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetAllLogDrainsRequest$outboundSchema = z.object({
    projectId: z.string().optional(),
    includeMetadata: z.boolean().default(false),
    projectIdOrName: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
export function getAllLogDrainsRequestToJSON(getAllLogDrainsRequest) {
    return JSON.stringify(GetAllLogDrainsRequest$outboundSchema.parse(getAllLogDrainsRequest));
}
export function getAllLogDrainsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsRequest' from JSON`);
}
/** @internal */
export const GetAllLogDrainsResponseBodyFramework$inboundSchema = z.nativeEnum(GetAllLogDrainsResponseBodyFramework);
/** @internal */
export const GetAllLogDrainsResponseBodyFramework$outboundSchema = GetAllLogDrainsResponseBodyFramework$inboundSchema;
/** @internal */
export const ResponseBodyProjectsMetadata$inboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetAllLogDrainsResponseBodyFramework$inboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
/** @internal */
export const ResponseBodyProjectsMetadata$outboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetAllLogDrainsResponseBodyFramework$outboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
export function responseBodyProjectsMetadataToJSON(responseBodyProjectsMetadata) {
    return JSON.stringify(ResponseBodyProjectsMetadata$outboundSchema.parse(responseBodyProjectsMetadata));
}
export function responseBodyProjectsMetadataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyProjectsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyProjectsMetadata' from JSON`);
}
/** @internal */
export const GetAllLogDrainsResponseBody2$inboundSchema = z.object({
    createdFrom: z.string(),
    clientId: z.string().optional(),
    configurationId: z.string().optional(),
    projectsMetadata: z.nullable(z.array(z.lazy(() => ResponseBodyProjectsMetadata$inboundSchema))).optional(),
    integrationIcon: z.string().optional(),
    integrationConfigurationUri: z.string().optional(),
    integrationWebsite: z.string().optional(),
});
/** @internal */
export const GetAllLogDrainsResponseBody2$outboundSchema = z.object({
    createdFrom: z.string(),
    clientId: z.string().optional(),
    configurationId: z.string().optional(),
    projectsMetadata: z.nullable(z.array(z.lazy(() => ResponseBodyProjectsMetadata$outboundSchema))).optional(),
    integrationIcon: z.string().optional(),
    integrationConfigurationUri: z.string().optional(),
    integrationWebsite: z.string().optional(),
});
export function getAllLogDrainsResponseBody2ToJSON(getAllLogDrainsResponseBody2) {
    return JSON.stringify(GetAllLogDrainsResponseBody2$outboundSchema.parse(getAllLogDrainsResponseBody2));
}
export function getAllLogDrainsResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsResponseBody2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsLog$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsLog$outboundSchema = z.object({});
export function getAllLogDrainsDrainsLogDrainsLogToJSON(getAllLogDrainsDrainsLogDrainsLog) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsLog$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsLog));
}
export function getAllLogDrainsDrainsLogDrainsLogFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsLog$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsLog' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsTrace$outboundSchema = z.object({});
export function getAllLogDrainsDrainsLogDrainsTraceToJSON(getAllLogDrainsDrainsLogDrainsTrace) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsTrace$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsTrace));
}
export function getAllLogDrainsDrainsLogDrainsTraceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsTrace' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsAnalytics$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsAnalytics$outboundSchema = z.object({});
export function getAllLogDrainsDrainsAnalyticsToJSON(getAllLogDrainsDrainsAnalytics) {
    return JSON.stringify(GetAllLogDrainsDrainsAnalytics$outboundSchema.parse(getAllLogDrainsDrainsAnalytics));
}
export function getAllLogDrainsDrainsAnalyticsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsAnalytics' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsSpeedInsights$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsSpeedInsights$outboundSchema = z.object({});
export function getAllLogDrainsDrainsSpeedInsightsToJSON(getAllLogDrainsDrainsSpeedInsights) {
    return JSON.stringify(GetAllLogDrainsDrainsSpeedInsights$outboundSchema.parse(getAllLogDrainsDrainsSpeedInsights));
}
export function getAllLogDrainsDrainsSpeedInsightsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsSpeedInsights$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsSpeedInsights' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema = z.object({
    log: z.lazy(() => GetAllLogDrainsDrainsLogDrainsLog$inboundSchema).optional(),
    trace: z.lazy(() => GetAllLogDrainsDrainsLogDrainsTrace$inboundSchema)
        .optional(),
    analytics: z.lazy(() => GetAllLogDrainsDrainsAnalytics$inboundSchema)
        .optional(),
    speed_insights: z.lazy(() => GetAllLogDrainsDrainsSpeedInsights$inboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        "speed_insights": "speedInsights",
    });
});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSchemas$outboundSchema = z.object({
    log: z.lazy(() => GetAllLogDrainsDrainsLogDrainsLog$outboundSchema)
        .optional(),
    trace: z.lazy(() => GetAllLogDrainsDrainsLogDrainsTrace$outboundSchema)
        .optional(),
    analytics: z.lazy(() => GetAllLogDrainsDrainsAnalytics$outboundSchema)
        .optional(),
    speedInsights: z.lazy(() => GetAllLogDrainsDrainsSpeedInsights$outboundSchema)
        .optional(),
}).transform((v) => {
    return remap$(v, {
        speedInsights: "speed_insights",
    });
});
export function getAllLogDrainsDrainsLogDrainsSchemasToJSON(getAllLogDrainsDrainsLogDrainsSchemas) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsSchemas$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsSchemas));
}
export function getAllLogDrainsDrainsLogDrainsSchemasFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsSchemas' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryTarget$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryTarget);
/** @internal */
export const GetAllLogDrainsDeliveryTarget$outboundSchema = GetAllLogDrainsDeliveryTarget$inboundSchema;
/** @internal */
export const GetAllLogDrainsDelivery4$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type$inboundSchema,
    target: GetAllLogDrainsDeliveryTarget$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsDelivery4$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1Type$outboundSchema,
    target: GetAllLogDrainsDeliveryTarget$outboundSchema,
});
export function getAllLogDrainsDelivery4ToJSON(getAllLogDrainsDelivery4) {
    return JSON.stringify(GetAllLogDrainsDelivery4$outboundSchema.parse(getAllLogDrainsDelivery4));
}
export function getAllLogDrainsDelivery4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDelivery4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDelivery4' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDelivery3$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType$inboundSchema,
    endpoint: z.string(),
    table: z.string(),
});
/** @internal */
export const GetAllLogDrainsDelivery3$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBodyType$outboundSchema,
    endpoint: z.string(),
    table: z.string(),
});
export function getAllLogDrainsDelivery3ToJSON(getAllLogDrainsDelivery3) {
    return JSON.stringify(GetAllLogDrainsDelivery3$outboundSchema.parse(getAllLogDrainsDelivery3));
}
export function getAllLogDrainsDelivery3FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDelivery3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDelivery3' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema = z.object({
    traces: z.string(),
});
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEndpoint$outboundSchema = z.object({
    traces: z.string(),
});
export function getAllLogDrainsDeliveryLogDrainsEndpointToJSON(getAllLogDrainsDeliveryLogDrainsEndpoint) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrainsEndpoint$outboundSchema.parse(getAllLogDrainsDeliveryLogDrainsEndpoint));
}
export function getAllLogDrainsDeliveryLogDrainsEndpointFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrainsEndpoint' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseEncoding$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponseEncoding);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseEncoding$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponseEncoding$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponseKind$inboundSchema = z
    .nativeEnum(GetAllLogDrainsSecretLogDrainsResponseKind);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponseKind$outboundSchema = GetAllLogDrainsSecretLogDrainsResponseKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsResponseKind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2$outboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsResponseKind$outboundSchema,
});
export function getAllLogDrainsSecretLogDrainsResponse2ToJSON(getAllLogDrainsSecretLogDrainsResponse2) {
    return JSON.stringify(GetAllLogDrainsSecretLogDrainsResponse2$outboundSchema.parse(getAllLogDrainsSecretLogDrainsResponse2));
}
export function getAllLogDrainsSecretLogDrainsResponse2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSecretLogDrainsResponse2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsSecret$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema),
    z.string(),
]);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsSecret$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$outboundSchema),
    z.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsSecretToJSON(getAllLogDrainsDeliveryLogDrainsSecret) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrainsSecret$outboundSchema.parse(getAllLogDrainsDeliveryLogDrainsSecret));
}
export function getAllLogDrainsDeliveryLogDrainsSecretFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrainsSecret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrainsSecret' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDelivery2$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType$inboundSchema,
    endpoint: z.lazy(() => GetAllLogDrainsDeliveryLogDrainsEndpoint$inboundSchema),
    encoding: GetAllLogDrainsDeliveryLogDrainsResponseEncoding$inboundSchema,
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$inboundSchema),
        z.string(),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDelivery2$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONType$outboundSchema,
    endpoint: z.lazy(() => GetAllLogDrainsDeliveryLogDrainsEndpoint$outboundSchema),
    encoding: GetAllLogDrainsDeliveryLogDrainsResponseEncoding$outboundSchema,
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2$outboundSchema),
        z.string(),
    ]).optional(),
});
export function getAllLogDrainsDelivery2ToJSON(getAllLogDrainsDelivery2) {
    return JSON.stringify(GetAllLogDrainsDelivery2$outboundSchema.parse(getAllLogDrainsDelivery2));
}
export function getAllLogDrainsDelivery2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDelivery2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDelivery2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Type$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200Type);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Type$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200Type$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEncoding$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDeliveryLogDrainsEncoding);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsEncoding$outboundSchema = GetAllLogDrainsDeliveryLogDrainsEncoding$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsCompression$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDeliveryLogDrainsCompression);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsCompression$outboundSchema = GetAllLogDrainsDeliveryLogDrainsCompression$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrainsKind$inboundSchema = z.nativeEnum(GetAllLogDrainsSecretLogDrainsKind);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsKind$outboundSchema = GetAllLogDrainsSecretLogDrainsKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrains2$inboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsKind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSecretLogDrains2$outboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsKind$outboundSchema,
});
export function getAllLogDrainsSecretLogDrains2ToJSON(getAllLogDrainsSecretLogDrains2) {
    return JSON.stringify(GetAllLogDrainsSecretLogDrains2$outboundSchema.parse(getAllLogDrainsSecretLogDrains2));
}
export function getAllLogDrainsSecretLogDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSecretLogDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSecretLogDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliverySecret$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrains2$inboundSchema),
    z.string(),
]);
/** @internal */
export const GetAllLogDrainsDeliverySecret$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrains2$outboundSchema),
    z.string(),
]);
export function getAllLogDrainsDeliverySecretToJSON(getAllLogDrainsDeliverySecret) {
    return JSON.stringify(GetAllLogDrainsDeliverySecret$outboundSchema.parse(getAllLogDrainsDeliverySecret));
}
export function getAllLogDrainsDeliverySecretFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliverySecret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliverySecret' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDelivery1$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200Type$inboundSchema,
    endpoint: z.string(),
    encoding: GetAllLogDrainsDeliveryLogDrainsEncoding$inboundSchema,
    compression: GetAllLogDrainsDeliveryLogDrainsCompression$inboundSchema
        .optional(),
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrains2$inboundSchema),
        z.string(),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDelivery1$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200Type$outboundSchema,
    endpoint: z.string(),
    encoding: GetAllLogDrainsDeliveryLogDrainsEncoding$outboundSchema,
    compression: GetAllLogDrainsDeliveryLogDrainsCompression$outboundSchema
        .optional(),
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrains2$outboundSchema),
        z.string(),
    ]).optional(),
});
export function getAllLogDrainsDelivery1ToJSON(getAllLogDrainsDelivery1) {
    return JSON.stringify(GetAllLogDrainsDelivery1$outboundSchema.parse(getAllLogDrainsDelivery1));
}
export function getAllLogDrainsDelivery1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDelivery1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDelivery1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDelivery$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsDelivery1$inboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery2$inboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery3$inboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery4$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDelivery$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsDelivery1$outboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery2$outboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery3$outboundSchema),
    z.lazy(() => GetAllLogDrainsDelivery4$outboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsDeliveryToJSON(getAllLogDrainsDrainsLogDrainsDelivery) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsDelivery$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsDelivery));
}
export function getAllLogDrainsDrainsLogDrainsDeliveryFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsDelivery$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsDelivery' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsType$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsType);
/** @internal */
export const GetAllLogDrainsDrainsType$outboundSchema = GetAllLogDrainsDrainsType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsEnv$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsEnv);
/** @internal */
export const GetAllLogDrainsDrainsEnv$outboundSchema = GetAllLogDrainsDrainsEnv$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema = z.object({
    type: GetAllLogDrainsDrainsType$inboundSchema,
    rate: z.number(),
    env: GetAllLogDrainsDrainsEnv$inboundSchema.optional(),
    requestPath: z.string().optional(),
});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSampling$outboundSchema = z.object({
    type: GetAllLogDrainsDrainsType$outboundSchema,
    rate: z.number(),
    env: GetAllLogDrainsDrainsEnv$outboundSchema.optional(),
    requestPath: z.string().optional(),
});
export function getAllLogDrainsDrainsLogDrainsSamplingToJSON(getAllLogDrainsDrainsLogDrainsSampling) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsSampling$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsSampling));
}
export function getAllLogDrainsDrainsLogDrainsSamplingFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsSampling' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsStatus$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsStatus);
/** @internal */
export const GetAllLogDrainsDrainsStatus$outboundSchema = GetAllLogDrainsDrainsStatus$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDisabledReason$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDrainsLogDrainsDisabledReason);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsDisabledReason$outboundSchema = GetAllLogDrainsDrainsLogDrainsDisabledReason$inboundSchema;
/** @internal */
export const GetAllLogDrainsSourceLogDrainsKind$inboundSchema = z.nativeEnum(GetAllLogDrainsSourceLogDrainsKind);
/** @internal */
export const GetAllLogDrainsSourceLogDrainsKind$outboundSchema = GetAllLogDrainsSourceLogDrainsKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSource2$inboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsKind$inboundSchema,
    resourceId: z.string().optional(),
    externalResourceId: z.string().optional(),
    integrationId: z.string(),
    integrationConfigurationId: z.string(),
});
/** @internal */
export const GetAllLogDrainsSource2$outboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsKind$outboundSchema,
    resourceId: z.string().optional(),
    externalResourceId: z.string().optional(),
    integrationId: z.string(),
    integrationConfigurationId: z.string(),
});
export function getAllLogDrainsSource2ToJSON(getAllLogDrainsSource2) {
    return JSON.stringify(GetAllLogDrainsSource2$outboundSchema.parse(getAllLogDrainsSource2));
}
export function getAllLogDrainsSource2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSource2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSource2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsSourceKind$inboundSchema = z.nativeEnum(GetAllLogDrainsSourceKind);
/** @internal */
export const GetAllLogDrainsSourceKind$outboundSchema = GetAllLogDrainsSourceKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSource1$inboundSchema = z.object({
    kind: GetAllLogDrainsSourceKind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSource1$outboundSchema = z.object({
    kind: GetAllLogDrainsSourceKind$outboundSchema,
});
export function getAllLogDrainsSource1ToJSON(getAllLogDrainsSource1) {
    return JSON.stringify(GetAllLogDrainsSource1$outboundSchema.parse(getAllLogDrainsSource1));
}
export function getAllLogDrainsSource1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSource1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSource1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsSource$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSource2$inboundSchema),
    z.lazy(() => GetAllLogDrainsSource1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsSource$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSource2$outboundSchema),
    z.lazy(() => GetAllLogDrainsSource1$outboundSchema),
]);
export function getAllLogDrainsDrainsSourceToJSON(getAllLogDrainsDrainsSource) {
    return JSON.stringify(GetAllLogDrainsDrainsSource$outboundSchema.parse(getAllLogDrainsDrainsSource));
}
export function getAllLogDrainsDrainsSourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsSource' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsVersion$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterV2LogDrainsVersion);
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsVersion$outboundSchema = GetAllLogDrainsFilterV2LogDrainsVersion$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLogDrainsResponseType$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterLogDrainsResponseType);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsResponseType$outboundSchema = GetAllLogDrainsFilterLogDrainsResponseType$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilter2$inboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsResponseType$inboundSchema,
    text: z.string(),
});
/** @internal */
export const GetAllLogDrainsFilter2$outboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsResponseType$outboundSchema,
    text: z.string(),
});
export function getAllLogDrainsFilter2ToJSON(getAllLogDrainsFilter2) {
    return JSON.stringify(GetAllLogDrainsFilter2$outboundSchema.parse(getAllLogDrainsFilter2));
}
export function getAllLogDrainsFilter2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilter2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilter2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsType$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterLogDrainsType);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsType$outboundSchema = GetAllLogDrainsFilterLogDrainsType$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterProject$inboundSchema = z.object({
    ids: z.array(z.string()).optional(),
});
/** @internal */
export const GetAllLogDrainsFilterProject$outboundSchema = z.object({
    ids: z.array(z.string()).optional(),
});
export function getAllLogDrainsFilterProjectToJSON(getAllLogDrainsFilterProject) {
    return JSON.stringify(GetAllLogDrainsFilterProject$outboundSchema.parse(getAllLogDrainsFilterProject));
}
export function getAllLogDrainsFilterProjectFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterProject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterProject' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsSources$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterLogDrainsSources);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsSources$outboundSchema = GetAllLogDrainsFilterLogDrainsSources$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLog$inboundSchema = z.object({
    sources: z.array(GetAllLogDrainsFilterLogDrainsSources$inboundSchema)
        .optional(),
    legacy_excludeCachedStaticAssetLogs: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        "legacy_excludeCachedStaticAssetLogs": "legacyExcludeCachedStaticAssetLogs",
    });
});
/** @internal */
export const GetAllLogDrainsFilterLog$outboundSchema = z.object({
    sources: z.array(GetAllLogDrainsFilterLogDrainsSources$outboundSchema)
        .optional(),
    legacyExcludeCachedStaticAssetLogs: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        legacyExcludeCachedStaticAssetLogs: "legacy_excludeCachedStaticAssetLogs",
    });
});
export function getAllLogDrainsFilterLogToJSON(getAllLogDrainsFilterLog) {
    return JSON.stringify(GetAllLogDrainsFilterLog$outboundSchema.parse(getAllLogDrainsFilterLog));
}
export function getAllLogDrainsFilterLogFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLog$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLog' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsEnvironments$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterLogDrainsEnvironments);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsEnvironments$outboundSchema = GetAllLogDrainsFilterLogDrainsEnvironments$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema = z.object({
    environments: z.array(GetAllLogDrainsFilterLogDrainsEnvironments$inboundSchema).optional(),
});
/** @internal */
export const GetAllLogDrainsFilterLogDrainsDeployment$outboundSchema = z.object({
    environments: z.array(GetAllLogDrainsFilterLogDrainsEnvironments$outboundSchema).optional(),
});
export function getAllLogDrainsFilterLogDrainsDeploymentToJSON(getAllLogDrainsFilterLogDrainsDeployment) {
    return JSON.stringify(GetAllLogDrainsFilterLogDrainsDeployment$outboundSchema.parse(getAllLogDrainsFilterLogDrainsDeployment));
}
export function getAllLogDrainsFilterLogDrainsDeploymentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLogDrainsDeployment' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilter1$inboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsType$inboundSchema,
    project: z.lazy(() => GetAllLogDrainsFilterProject$inboundSchema).optional(),
    log: z.lazy(() => GetAllLogDrainsFilterLog$inboundSchema).optional(),
    deployment: z.lazy(() => GetAllLogDrainsFilterLogDrainsDeployment$inboundSchema).optional(),
});
/** @internal */
export const GetAllLogDrainsFilter1$outboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsType$outboundSchema,
    project: z.lazy(() => GetAllLogDrainsFilterProject$outboundSchema).optional(),
    log: z.lazy(() => GetAllLogDrainsFilterLog$outboundSchema).optional(),
    deployment: z.lazy(() => GetAllLogDrainsFilterLogDrainsDeployment$outboundSchema).optional(),
});
export function getAllLogDrainsFilter1ToJSON(getAllLogDrainsFilter1) {
    return JSON.stringify(GetAllLogDrainsFilter1$outboundSchema.parse(getAllLogDrainsFilter1));
}
export function getAllLogDrainsFilter1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilter1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilter1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsFilter$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilter2$inboundSchema),
    z.lazy(() => GetAllLogDrainsFilter1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsFilter$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilter2$outboundSchema),
    z.lazy(() => GetAllLogDrainsFilter1$outboundSchema),
]);
export function getAllLogDrainsFilterV2LogDrainsFilterToJSON(getAllLogDrainsFilterV2LogDrainsFilter) {
    return JSON.stringify(GetAllLogDrainsFilterV2LogDrainsFilter$outboundSchema.parse(getAllLogDrainsFilterV2LogDrainsFilter));
}
export function getAllLogDrainsFilterV2LogDrainsFilterFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV2LogDrainsFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV2LogDrainsFilter' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV22$inboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsVersion$inboundSchema,
    filter: z.union([
        z.lazy(() => GetAllLogDrainsFilter2$inboundSchema),
        z.lazy(() => GetAllLogDrainsFilter1$inboundSchema),
    ]),
});
/** @internal */
export const GetAllLogDrainsFilterV22$outboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsVersion$outboundSchema,
    filter: z.union([
        z.lazy(() => GetAllLogDrainsFilter2$outboundSchema),
        z.lazy(() => GetAllLogDrainsFilter1$outboundSchema),
    ]),
});
export function getAllLogDrainsFilterV22ToJSON(getAllLogDrainsFilterV22) {
    return JSON.stringify(GetAllLogDrainsFilterV22$outboundSchema.parse(getAllLogDrainsFilterV22));
}
export function getAllLogDrainsFilterV22FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV22$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV22' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2Version$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterV2Version);
/** @internal */
export const GetAllLogDrainsFilterV2Version$outboundSchema = GetAllLogDrainsFilterV2Version$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterV21$inboundSchema = z.object({
    version: GetAllLogDrainsFilterV2Version$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsFilterV21$outboundSchema = z.object({
    version: GetAllLogDrainsFilterV2Version$outboundSchema,
});
export function getAllLogDrainsFilterV21ToJSON(getAllLogDrainsFilterV21) {
    return JSON.stringify(GetAllLogDrainsFilterV21$outboundSchema.parse(getAllLogDrainsFilterV21));
}
export function getAllLogDrainsFilterV21FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV21$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV21' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsFilterV2$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterV22$inboundSchema),
    z.lazy(() => GetAllLogDrainsFilterV21$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsFilterV2$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterV22$outboundSchema),
    z.lazy(() => GetAllLogDrainsFilterV21$outboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsFilterV2ToJSON(getAllLogDrainsDrainsLogDrainsFilterV2) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsFilterV2$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsFilterV2));
}
export function getAllLogDrainsDrainsLogDrainsFilterV2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsFilterV2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsFilterV2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsProjectAccessLogDrainsAccess$inboundSchema = z
    .nativeEnum(GetAllLogDrainsProjectAccessLogDrainsAccess);
/** @internal */
export const GetAllLogDrainsProjectAccessLogDrainsAccess$outboundSchema = GetAllLogDrainsProjectAccessLogDrainsAccess$inboundSchema;
/** @internal */
export const GetAllLogDrainsProjectAccess2$inboundSchema = z.object({
    access: GetAllLogDrainsProjectAccessLogDrainsAccess$inboundSchema,
    projectIds: z.array(z.string()),
});
/** @internal */
export const GetAllLogDrainsProjectAccess2$outboundSchema = z.object({
    access: GetAllLogDrainsProjectAccessLogDrainsAccess$outboundSchema,
    projectIds: z.array(z.string()),
});
export function getAllLogDrainsProjectAccess2ToJSON(getAllLogDrainsProjectAccess2) {
    return JSON.stringify(GetAllLogDrainsProjectAccess2$outboundSchema.parse(getAllLogDrainsProjectAccess2));
}
export function getAllLogDrainsProjectAccess2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsProjectAccess2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsProjectAccess2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsProjectAccessAccess$inboundSchema = z.nativeEnum(GetAllLogDrainsProjectAccessAccess);
/** @internal */
export const GetAllLogDrainsProjectAccessAccess$outboundSchema = GetAllLogDrainsProjectAccessAccess$inboundSchema;
/** @internal */
export const GetAllLogDrainsProjectAccess1$inboundSchema = z.object({
    access: GetAllLogDrainsProjectAccessAccess$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsProjectAccess1$outboundSchema = z.object({
    access: GetAllLogDrainsProjectAccessAccess$outboundSchema,
});
export function getAllLogDrainsProjectAccess1ToJSON(getAllLogDrainsProjectAccess1) {
    return JSON.stringify(GetAllLogDrainsProjectAccess1$outboundSchema.parse(getAllLogDrainsProjectAccess1));
}
export function getAllLogDrainsProjectAccess1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsProjectAccess1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsProjectAccess1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsProjectAccess$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsProjectAccess2$inboundSchema),
    z.lazy(() => GetAllLogDrainsProjectAccess1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsProjectAccess$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsProjectAccess2$outboundSchema),
    z.lazy(() => GetAllLogDrainsProjectAccess1$outboundSchema),
]);
export function getAllLogDrainsDrainsProjectAccessToJSON(getAllLogDrainsDrainsProjectAccess) {
    return JSON.stringify(GetAllLogDrainsDrainsProjectAccess$outboundSchema.parse(getAllLogDrainsDrainsProjectAccess));
}
export function getAllLogDrainsDrainsProjectAccessFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsProjectAccess$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsProjectAccess' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrains2$inboundSchema = z.object({
    id: z.string(),
    ownerId: z.string(),
    name: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
    schemas: z.lazy(() => GetAllLogDrainsDrainsLogDrainsSchemas$inboundSchema)
        .optional(),
    delivery: z.union([
        z.lazy(() => GetAllLogDrainsDelivery1$inboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery2$inboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery3$inboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery4$inboundSchema),
    ]).optional(),
    sampling: z.array(z.lazy(() => GetAllLogDrainsDrainsLogDrainsSampling$inboundSchema)).optional(),
    teamId: z.nullable(z.string()).optional(),
    status: GetAllLogDrainsDrainsStatus$inboundSchema.optional(),
    disabledAt: z.number().optional(),
    disabledReason: GetAllLogDrainsDrainsLogDrainsDisabledReason$inboundSchema
        .optional(),
    disabledBy: z.string().optional(),
    firstErrorTimestamp: z.number().optional(),
    source: z.union([
        z.lazy(() => GetAllLogDrainsSource2$inboundSchema),
        z.lazy(() => GetAllLogDrainsSource1$inboundSchema),
    ]),
    filter: z.string().optional(),
    filterV2: z.union([
        z.lazy(() => GetAllLogDrainsFilterV22$inboundSchema),
        z.lazy(() => GetAllLogDrainsFilterV21$inboundSchema),
    ]).optional(),
    integrationIcon: z.string().optional(),
    integrationConfigurationUri: z.string().optional(),
    integrationWebsite: z.string().optional(),
    projectAccess: z.union([
        z.lazy(() => GetAllLogDrainsProjectAccess2$inboundSchema),
        z.lazy(() => GetAllLogDrainsProjectAccess1$inboundSchema),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDrains2$outboundSchema = z.object({
    id: z.string(),
    ownerId: z.string(),
    name: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
    schemas: z.lazy(() => GetAllLogDrainsDrainsLogDrainsSchemas$outboundSchema)
        .optional(),
    delivery: z.union([
        z.lazy(() => GetAllLogDrainsDelivery1$outboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery2$outboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery3$outboundSchema),
        z.lazy(() => GetAllLogDrainsDelivery4$outboundSchema),
    ]).optional(),
    sampling: z.array(z.lazy(() => GetAllLogDrainsDrainsLogDrainsSampling$outboundSchema)).optional(),
    teamId: z.nullable(z.string()).optional(),
    status: GetAllLogDrainsDrainsStatus$outboundSchema.optional(),
    disabledAt: z.number().optional(),
    disabledReason: GetAllLogDrainsDrainsLogDrainsDisabledReason$outboundSchema
        .optional(),
    disabledBy: z.string().optional(),
    firstErrorTimestamp: z.number().optional(),
    source: z.union([
        z.lazy(() => GetAllLogDrainsSource2$outboundSchema),
        z.lazy(() => GetAllLogDrainsSource1$outboundSchema),
    ]),
    filter: z.string().optional(),
    filterV2: z.union([
        z.lazy(() => GetAllLogDrainsFilterV22$outboundSchema),
        z.lazy(() => GetAllLogDrainsFilterV21$outboundSchema),
    ]).optional(),
    integrationIcon: z.string().optional(),
    integrationConfigurationUri: z.string().optional(),
    integrationWebsite: z.string().optional(),
    projectAccess: z.union([
        z.lazy(() => GetAllLogDrainsProjectAccess2$outboundSchema),
        z.lazy(() => GetAllLogDrainsProjectAccess1$outboundSchema),
    ]).optional(),
});
export function getAllLogDrainsDrains2ToJSON(getAllLogDrainsDrains2) {
    return JSON.stringify(GetAllLogDrainsDrains2$outboundSchema.parse(getAllLogDrainsDrains2));
}
export function getAllLogDrainsDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLog$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsLog$outboundSchema = z.object({});
export function getAllLogDrainsDrainsLogToJSON(getAllLogDrainsDrainsLog) {
    return JSON.stringify(GetAllLogDrainsDrainsLog$outboundSchema.parse(getAllLogDrainsDrainsLog));
}
export function getAllLogDrainsDrainsLogFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLog$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLog' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsTrace$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsTrace$outboundSchema = z.object({});
export function getAllLogDrainsDrainsTraceToJSON(getAllLogDrainsDrainsTrace) {
    return JSON.stringify(GetAllLogDrainsDrainsTrace$outboundSchema.parse(getAllLogDrainsDrainsTrace));
}
export function getAllLogDrainsDrainsTraceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsTrace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsTrace' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsAnalytics$outboundSchema = z.object({});
export function getAllLogDrainsDrainsLogDrainsAnalyticsToJSON(getAllLogDrainsDrainsLogDrainsAnalytics) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsAnalytics$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsAnalytics));
}
export function getAllLogDrainsDrainsLogDrainsAnalyticsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsAnalytics' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema = z.object({});
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSpeedInsights$outboundSchema = z.object({});
export function getAllLogDrainsDrainsLogDrainsSpeedInsightsToJSON(getAllLogDrainsDrainsLogDrainsSpeedInsights) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsSpeedInsights$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsSpeedInsights));
}
export function getAllLogDrainsDrainsLogDrainsSpeedInsightsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsSpeedInsights' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsSchemas$inboundSchema = z.object({
    log: z.lazy(() => GetAllLogDrainsDrainsLog$inboundSchema).optional(),
    trace: z.lazy(() => GetAllLogDrainsDrainsTrace$inboundSchema).optional(),
    analytics: z.lazy(() => GetAllLogDrainsDrainsLogDrainsAnalytics$inboundSchema)
        .optional(),
    speed_insights: z.lazy(() => GetAllLogDrainsDrainsLogDrainsSpeedInsights$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "speed_insights": "speedInsights",
    });
});
/** @internal */
export const GetAllLogDrainsDrainsSchemas$outboundSchema = z.object({
    log: z.lazy(() => GetAllLogDrainsDrainsLog$outboundSchema).optional(),
    trace: z.lazy(() => GetAllLogDrainsDrainsTrace$outboundSchema).optional(),
    analytics: z.lazy(() => GetAllLogDrainsDrainsLogDrainsAnalytics$outboundSchema).optional(),
    speedInsights: z.lazy(() => GetAllLogDrainsDrainsLogDrainsSpeedInsights$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        speedInsights: "speed_insights",
    });
});
export function getAllLogDrainsDrainsSchemasToJSON(getAllLogDrainsDrainsSchemas) {
    return JSON.stringify(GetAllLogDrainsDrainsSchemas$outboundSchema.parse(getAllLogDrainsDrainsSchemas));
}
export function getAllLogDrainsDrainsSchemasFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsSchemas$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsSchemas' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseType$inboundSchema = z
    .nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponseType);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseType$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponseType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsTarget$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsTarget);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsTarget$outboundSchema = GetAllLogDrainsDeliveryLogDrainsTarget$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains4$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponseType$inboundSchema,
    target: GetAllLogDrainsDeliveryLogDrainsTarget$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains4$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponseType$outboundSchema,
    target: GetAllLogDrainsDeliveryLogDrainsTarget$outboundSchema,
});
export function getAllLogDrainsDeliveryLogDrains4ToJSON(getAllLogDrainsDeliveryLogDrains4) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrains4$outboundSchema.parse(getAllLogDrainsDeliveryLogDrains4));
}
export function getAllLogDrainsDeliveryLogDrains4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrains4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrains4' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsType$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsType);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsType$outboundSchema = GetAllLogDrainsDeliveryLogDrainsType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains3$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsType$inboundSchema,
    endpoint: z.string(),
    table: z.string(),
});
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains3$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsType$outboundSchema,
    endpoint: z.string(),
    table: z.string(),
});
export function getAllLogDrainsDeliveryLogDrains3ToJSON(getAllLogDrainsDeliveryLogDrains3) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrains3$outboundSchema.parse(getAllLogDrainsDeliveryLogDrains3));
}
export function getAllLogDrainsDeliveryLogDrains3FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrains3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrains3' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryType$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryType);
/** @internal */
export const GetAllLogDrainsDeliveryType$outboundSchema = GetAllLogDrainsDeliveryType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryEndpoint$inboundSchema = z.object({
    traces: z.string(),
});
/** @internal */
export const GetAllLogDrainsDeliveryEndpoint$outboundSchema = z.object({
    traces: z.string(),
});
export function getAllLogDrainsDeliveryEndpointToJSON(getAllLogDrainsDeliveryEndpoint) {
    return JSON.stringify(GetAllLogDrainsDeliveryEndpoint$outboundSchema.parse(getAllLogDrainsDeliveryEndpoint));
}
export function getAllLogDrainsDeliveryEndpointFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryEndpoint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryEndpoint' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryEncoding$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryEncoding);
/** @internal */
export const GetAllLogDrainsDeliveryEncoding$outboundSchema = GetAllLogDrainsDeliveryEncoding$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse200Kind$inboundSchema = z
    .nativeEnum(GetAllLogDrainsSecretLogDrainsResponse200Kind);
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse200Kind$outboundSchema = GetAllLogDrainsSecretLogDrainsResponse200Kind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecret2$inboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsResponse200Kind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSecret2$outboundSchema = z.object({
    kind: GetAllLogDrainsSecretLogDrainsResponse200Kind$outboundSchema,
});
export function getAllLogDrainsSecret2ToJSON(getAllLogDrainsSecret2) {
    return JSON.stringify(GetAllLogDrainsSecret2$outboundSchema.parse(getAllLogDrainsSecret2));
}
export function getAllLogDrainsSecret2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSecret2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSecret2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Secret$inboundSchema = z.union([z.lazy(() => GetAllLogDrainsSecret2$inboundSchema), z.string()]);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Secret$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecret2$outboundSchema),
    z.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsResponse200SecretToJSON(getAllLogDrainsDeliveryLogDrainsResponse200Secret) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrainsResponse200Secret$outboundSchema.parse(getAllLogDrainsDeliveryLogDrainsResponse200Secret));
}
export function getAllLogDrainsDeliveryLogDrainsResponse200SecretFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrainsResponse200Secret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrainsResponse200Secret' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains2$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryType$inboundSchema,
    endpoint: z.lazy(() => GetAllLogDrainsDeliveryEndpoint$inboundSchema),
    encoding: GetAllLogDrainsDeliveryEncoding$inboundSchema,
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecret2$inboundSchema),
        z.string(),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains2$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryType$outboundSchema,
    endpoint: z.lazy(() => GetAllLogDrainsDeliveryEndpoint$outboundSchema),
    encoding: GetAllLogDrainsDeliveryEncoding$outboundSchema,
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecret2$outboundSchema),
        z.string(),
    ]).optional(),
});
export function getAllLogDrainsDeliveryLogDrains2ToJSON(getAllLogDrainsDeliveryLogDrains2) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrains2$outboundSchema.parse(getAllLogDrainsDeliveryLogDrains2));
}
export function getAllLogDrainsDeliveryLogDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryLogDrainsResponse200Encoding);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$outboundSchema = GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$inboundSchema;
/** @internal */
export const GetAllLogDrainsDeliveryCompression$inboundSchema = z.nativeEnum(GetAllLogDrainsDeliveryCompression);
/** @internal */
export const GetAllLogDrainsDeliveryCompression$outboundSchema = GetAllLogDrainsDeliveryCompression$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretKind$inboundSchema = z.nativeEnum(GetAllLogDrainsSecretKind);
/** @internal */
export const GetAllLogDrainsSecretKind$outboundSchema = GetAllLogDrainsSecretKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema = z.object({
    kind: GetAllLogDrainsSecretKind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSecretLogDrainsResponse2002$outboundSchema = z.object({
    kind: GetAllLogDrainsSecretKind$outboundSchema,
});
export function getAllLogDrainsSecretLogDrainsResponse2002ToJSON(getAllLogDrainsSecretLogDrainsResponse2002) {
    return JSON.stringify(GetAllLogDrainsSecretLogDrainsResponse2002$outboundSchema.parse(getAllLogDrainsSecretLogDrainsResponse2002));
}
export function getAllLogDrainsSecretLogDrainsResponse2002FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSecretLogDrainsResponse2002' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseSecret$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema),
    z.string(),
]);
/** @internal */
export const GetAllLogDrainsDeliveryLogDrainsResponseSecret$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$outboundSchema),
    z.string(),
]);
export function getAllLogDrainsDeliveryLogDrainsResponseSecretToJSON(getAllLogDrainsDeliveryLogDrainsResponseSecret) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrainsResponseSecret$outboundSchema.parse(getAllLogDrainsDeliveryLogDrainsResponseSecret));
}
export function getAllLogDrainsDeliveryLogDrainsResponseSecretFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrainsResponseSecret$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrainsResponseSecret' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains1$inboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType$inboundSchema,
    endpoint: z.string(),
    encoding: GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$inboundSchema,
    compression: GetAllLogDrainsDeliveryCompression$inboundSchema.optional(),
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$inboundSchema),
        z.string(),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDeliveryLogDrains1$outboundSchema = z.object({
    type: GetAllLogDrainsDeliveryLogDrainsResponse200ApplicationJSONResponseBody1DrainsType$outboundSchema,
    endpoint: z.string(),
    encoding: GetAllLogDrainsDeliveryLogDrainsResponse200Encoding$outboundSchema,
    compression: GetAllLogDrainsDeliveryCompression$outboundSchema.optional(),
    headers: z.record(z.string()),
    secret: z.union([
        z.lazy(() => GetAllLogDrainsSecretLogDrainsResponse2002$outboundSchema),
        z.string(),
    ]).optional(),
});
export function getAllLogDrainsDeliveryLogDrains1ToJSON(getAllLogDrainsDeliveryLogDrains1) {
    return JSON.stringify(GetAllLogDrainsDeliveryLogDrains1$outboundSchema.parse(getAllLogDrainsDeliveryLogDrains1));
}
export function getAllLogDrainsDeliveryLogDrains1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDeliveryLogDrains1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDeliveryLogDrains1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsDelivery$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$inboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$inboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$inboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsDelivery$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$outboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$outboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$outboundSchema),
    z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$outboundSchema),
]);
export function getAllLogDrainsDrainsDeliveryToJSON(getAllLogDrainsDrainsDelivery) {
    return JSON.stringify(GetAllLogDrainsDrainsDelivery$outboundSchema.parse(getAllLogDrainsDrainsDelivery));
}
export function getAllLogDrainsDrainsDeliveryFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsDelivery$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsDelivery' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsType$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsLogDrainsType);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsType$outboundSchema = GetAllLogDrainsDrainsLogDrainsType$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsEnv$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsLogDrainsEnv);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsEnv$outboundSchema = GetAllLogDrainsDrainsLogDrainsEnv$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsSampling$inboundSchema = z.object({
    type: GetAllLogDrainsDrainsLogDrainsType$inboundSchema,
    rate: z.number(),
    env: GetAllLogDrainsDrainsLogDrainsEnv$inboundSchema.optional(),
    requestPath: z.string().optional(),
});
/** @internal */
export const GetAllLogDrainsDrainsSampling$outboundSchema = z.object({
    type: GetAllLogDrainsDrainsLogDrainsType$outboundSchema,
    rate: z.number(),
    env: GetAllLogDrainsDrainsLogDrainsEnv$outboundSchema.optional(),
    requestPath: z.string().optional(),
});
export function getAllLogDrainsDrainsSamplingToJSON(getAllLogDrainsDrainsSampling) {
    return JSON.stringify(GetAllLogDrainsDrainsSampling$outboundSchema.parse(getAllLogDrainsDrainsSampling));
}
export function getAllLogDrainsDrainsSamplingFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsSampling$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsSampling' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsStatus$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsLogDrainsStatus);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsStatus$outboundSchema = GetAllLogDrainsDrainsLogDrainsStatus$inboundSchema;
/** @internal */
export const GetAllLogDrainsDrainsDisabledReason$inboundSchema = z.nativeEnum(GetAllLogDrainsDrainsDisabledReason);
/** @internal */
export const GetAllLogDrainsDrainsDisabledReason$outboundSchema = GetAllLogDrainsDrainsDisabledReason$inboundSchema;
/** @internal */
export const GetAllLogDrainsSourceLogDrainsResponse200Kind$inboundSchema = z
    .nativeEnum(GetAllLogDrainsSourceLogDrainsResponse200Kind);
/** @internal */
export const GetAllLogDrainsSourceLogDrainsResponse200Kind$outboundSchema = GetAllLogDrainsSourceLogDrainsResponse200Kind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSourceLogDrains2$inboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsResponse200Kind$inboundSchema,
    resourceId: z.string().optional(),
    externalResourceId: z.string().optional(),
    integrationId: z.string(),
    integrationConfigurationId: z.string(),
});
/** @internal */
export const GetAllLogDrainsSourceLogDrains2$outboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsResponse200Kind$outboundSchema,
    resourceId: z.string().optional(),
    externalResourceId: z.string().optional(),
    integrationId: z.string(),
    integrationConfigurationId: z.string(),
});
export function getAllLogDrainsSourceLogDrains2ToJSON(getAllLogDrainsSourceLogDrains2) {
    return JSON.stringify(GetAllLogDrainsSourceLogDrains2$outboundSchema.parse(getAllLogDrainsSourceLogDrains2));
}
export function getAllLogDrainsSourceLogDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSourceLogDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSourceLogDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsSourceLogDrainsResponseKind$inboundSchema = z
    .nativeEnum(GetAllLogDrainsSourceLogDrainsResponseKind);
/** @internal */
export const GetAllLogDrainsSourceLogDrainsResponseKind$outboundSchema = GetAllLogDrainsSourceLogDrainsResponseKind$inboundSchema;
/** @internal */
export const GetAllLogDrainsSourceLogDrains1$inboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsResponseKind$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsSourceLogDrains1$outboundSchema = z.object({
    kind: GetAllLogDrainsSourceLogDrainsResponseKind$outboundSchema,
});
export function getAllLogDrainsSourceLogDrains1ToJSON(getAllLogDrainsSourceLogDrains1) {
    return JSON.stringify(GetAllLogDrainsSourceLogDrains1$outboundSchema.parse(getAllLogDrainsSourceLogDrains1));
}
export function getAllLogDrainsSourceLogDrains1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsSourceLogDrains1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsSourceLogDrains1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSource$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSourceLogDrains2$inboundSchema),
    z.lazy(() => GetAllLogDrainsSourceLogDrains1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsLogDrainsSource$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsSourceLogDrains2$outboundSchema),
    z.lazy(() => GetAllLogDrainsSourceLogDrains1$outboundSchema),
]);
export function getAllLogDrainsDrainsLogDrainsSourceToJSON(getAllLogDrainsDrainsLogDrainsSource) {
    return JSON.stringify(GetAllLogDrainsDrainsLogDrainsSource$outboundSchema.parse(getAllLogDrainsDrainsLogDrainsSource));
}
export function getAllLogDrainsDrainsLogDrainsSourceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsLogDrainsSource$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsLogDrainsSource' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsResponse200Version$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterV2LogDrainsResponse200Version);
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsResponse200Version$outboundSchema = GetAllLogDrainsFilterV2LogDrainsResponse200Version$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterType$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterType);
/** @internal */
export const GetAllLogDrainsFilterType$outboundSchema = GetAllLogDrainsFilterType$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLogDrains2$inboundSchema = z.object({
    type: GetAllLogDrainsFilterType$inboundSchema,
    text: z.string(),
});
/** @internal */
export const GetAllLogDrainsFilterLogDrains2$outboundSchema = z.object({
    type: GetAllLogDrainsFilterType$outboundSchema,
    text: z.string(),
});
export function getAllLogDrainsFilterLogDrains2ToJSON(getAllLogDrainsFilterLogDrains2) {
    return JSON.stringify(GetAllLogDrainsFilterLogDrains2$outboundSchema.parse(getAllLogDrainsFilterLogDrains2));
}
export function getAllLogDrainsFilterLogDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLogDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLogDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrainsResponse200Type$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterLogDrainsResponse200Type);
/** @internal */
export const GetAllLogDrainsFilterLogDrainsResponse200Type$outboundSchema = GetAllLogDrainsFilterLogDrainsResponse200Type$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLogDrainsProject$inboundSchema = z.object({
    ids: z.array(z.string()).optional(),
});
/** @internal */
export const GetAllLogDrainsFilterLogDrainsProject$outboundSchema = z.object({
    ids: z.array(z.string()).optional(),
});
export function getAllLogDrainsFilterLogDrainsProjectToJSON(getAllLogDrainsFilterLogDrainsProject) {
    return JSON.stringify(GetAllLogDrainsFilterLogDrainsProject$outboundSchema.parse(getAllLogDrainsFilterLogDrainsProject));
}
export function getAllLogDrainsFilterLogDrainsProjectFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLogDrainsProject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLogDrainsProject' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterSources$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterSources);
/** @internal */
export const GetAllLogDrainsFilterSources$outboundSchema = GetAllLogDrainsFilterSources$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterLogDrainsLog$inboundSchema = z.object({
    sources: z.array(GetAllLogDrainsFilterSources$inboundSchema).optional(),
    legacy_excludeCachedStaticAssetLogs: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        "legacy_excludeCachedStaticAssetLogs": "legacyExcludeCachedStaticAssetLogs",
    });
});
/** @internal */
export const GetAllLogDrainsFilterLogDrainsLog$outboundSchema = z.object({
    sources: z.array(GetAllLogDrainsFilterSources$outboundSchema).optional(),
    legacyExcludeCachedStaticAssetLogs: z.boolean().optional(),
}).transform((v) => {
    return remap$(v, {
        legacyExcludeCachedStaticAssetLogs: "legacy_excludeCachedStaticAssetLogs",
    });
});
export function getAllLogDrainsFilterLogDrainsLogToJSON(getAllLogDrainsFilterLogDrainsLog) {
    return JSON.stringify(GetAllLogDrainsFilterLogDrainsLog$outboundSchema.parse(getAllLogDrainsFilterLogDrainsLog));
}
export function getAllLogDrainsFilterLogDrainsLogFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLogDrainsLog$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLogDrainsLog' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterEnvironments$inboundSchema = z.nativeEnum(GetAllLogDrainsFilterEnvironments);
/** @internal */
export const GetAllLogDrainsFilterEnvironments$outboundSchema = GetAllLogDrainsFilterEnvironments$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterDeployment$inboundSchema = z.object({
    environments: z.array(GetAllLogDrainsFilterEnvironments$inboundSchema)
        .optional(),
});
/** @internal */
export const GetAllLogDrainsFilterDeployment$outboundSchema = z.object({
    environments: z.array(GetAllLogDrainsFilterEnvironments$outboundSchema)
        .optional(),
});
export function getAllLogDrainsFilterDeploymentToJSON(getAllLogDrainsFilterDeployment) {
    return JSON.stringify(GetAllLogDrainsFilterDeployment$outboundSchema.parse(getAllLogDrainsFilterDeployment));
}
export function getAllLogDrainsFilterDeploymentFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterDeployment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterDeployment' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterLogDrains1$inboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsResponse200Type$inboundSchema,
    project: z.lazy(() => GetAllLogDrainsFilterLogDrainsProject$inboundSchema)
        .optional(),
    log: z.lazy(() => GetAllLogDrainsFilterLogDrainsLog$inboundSchema).optional(),
    deployment: z.lazy(() => GetAllLogDrainsFilterDeployment$inboundSchema)
        .optional(),
});
/** @internal */
export const GetAllLogDrainsFilterLogDrains1$outboundSchema = z.object({
    type: GetAllLogDrainsFilterLogDrainsResponse200Type$outboundSchema,
    project: z.lazy(() => GetAllLogDrainsFilterLogDrainsProject$outboundSchema)
        .optional(),
    log: z.lazy(() => GetAllLogDrainsFilterLogDrainsLog$outboundSchema)
        .optional(),
    deployment: z.lazy(() => GetAllLogDrainsFilterDeployment$outboundSchema)
        .optional(),
});
export function getAllLogDrainsFilterLogDrains1ToJSON(getAllLogDrainsFilterLogDrains1) {
    return JSON.stringify(GetAllLogDrainsFilterLogDrains1$outboundSchema.parse(getAllLogDrainsFilterLogDrains1));
}
export function getAllLogDrainsFilterLogDrains1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterLogDrains1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterLogDrains1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2Filter$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterLogDrains2$inboundSchema),
    z.lazy(() => GetAllLogDrainsFilterLogDrains1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsFilterV2Filter$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterLogDrains2$outboundSchema),
    z.lazy(() => GetAllLogDrainsFilterLogDrains1$outboundSchema),
]);
export function getAllLogDrainsFilterV2FilterToJSON(getAllLogDrainsFilterV2Filter) {
    return JSON.stringify(GetAllLogDrainsFilterV2Filter$outboundSchema.parse(getAllLogDrainsFilterV2Filter));
}
export function getAllLogDrainsFilterV2FilterFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV2Filter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV2Filter' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2LogDrains2$inboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsResponse200Version$inboundSchema,
    filter: z.union([
        z.lazy(() => GetAllLogDrainsFilterLogDrains2$inboundSchema),
        z.lazy(() => GetAllLogDrainsFilterLogDrains1$inboundSchema),
    ]),
});
/** @internal */
export const GetAllLogDrainsFilterV2LogDrains2$outboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsResponse200Version$outboundSchema,
    filter: z.union([
        z.lazy(() => GetAllLogDrainsFilterLogDrains2$outboundSchema),
        z.lazy(() => GetAllLogDrainsFilterLogDrains1$outboundSchema),
    ]),
});
export function getAllLogDrainsFilterV2LogDrains2ToJSON(getAllLogDrainsFilterV2LogDrains2) {
    return JSON.stringify(GetAllLogDrainsFilterV2LogDrains2$outboundSchema.parse(getAllLogDrainsFilterV2LogDrains2));
}
export function getAllLogDrainsFilterV2LogDrains2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV2LogDrains2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV2LogDrains2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsResponseVersion$inboundSchema = z
    .nativeEnum(GetAllLogDrainsFilterV2LogDrainsResponseVersion);
/** @internal */
export const GetAllLogDrainsFilterV2LogDrainsResponseVersion$outboundSchema = GetAllLogDrainsFilterV2LogDrainsResponseVersion$inboundSchema;
/** @internal */
export const GetAllLogDrainsFilterV2LogDrains1$inboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsResponseVersion$inboundSchema,
});
/** @internal */
export const GetAllLogDrainsFilterV2LogDrains1$outboundSchema = z.object({
    version: GetAllLogDrainsFilterV2LogDrainsResponseVersion$outboundSchema,
});
export function getAllLogDrainsFilterV2LogDrains1ToJSON(getAllLogDrainsFilterV2LogDrains1) {
    return JSON.stringify(GetAllLogDrainsFilterV2LogDrains1$outboundSchema.parse(getAllLogDrainsFilterV2LogDrains1));
}
export function getAllLogDrainsFilterV2LogDrains1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsFilterV2LogDrains1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsFilterV2LogDrains1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrainsFilterV2$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterV2LogDrains2$inboundSchema),
    z.lazy(() => GetAllLogDrainsFilterV2LogDrains1$inboundSchema),
]);
/** @internal */
export const GetAllLogDrainsDrainsFilterV2$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsFilterV2LogDrains2$outboundSchema),
    z.lazy(() => GetAllLogDrainsFilterV2LogDrains1$outboundSchema),
]);
export function getAllLogDrainsDrainsFilterV2ToJSON(getAllLogDrainsDrainsFilterV2) {
    return JSON.stringify(GetAllLogDrainsDrainsFilterV2$outboundSchema.parse(getAllLogDrainsDrainsFilterV2));
}
export function getAllLogDrainsDrainsFilterV2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrainsFilterV2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrainsFilterV2' from JSON`);
}
/** @internal */
export const GetAllLogDrainsDrains1$inboundSchema = z.object({
    id: z.string(),
    ownerId: z.string(),
    name: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
    schemas: z.lazy(() => GetAllLogDrainsDrainsSchemas$inboundSchema).optional(),
    delivery: z.union([
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$inboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$inboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$inboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$inboundSchema),
    ]).optional(),
    sampling: z.array(z.lazy(() => GetAllLogDrainsDrainsSampling$inboundSchema))
        .optional(),
    teamId: z.nullable(z.string()).optional(),
    status: GetAllLogDrainsDrainsLogDrainsStatus$inboundSchema.optional(),
    disabledAt: z.number().optional(),
    disabledReason: GetAllLogDrainsDrainsDisabledReason$inboundSchema.optional(),
    disabledBy: z.string().optional(),
    firstErrorTimestamp: z.number().optional(),
    source: z.union([
        z.lazy(() => GetAllLogDrainsSourceLogDrains2$inboundSchema),
        z.lazy(() => GetAllLogDrainsSourceLogDrains1$inboundSchema),
    ]),
    filter: z.string().optional(),
    filterV2: z.union([
        z.lazy(() => GetAllLogDrainsFilterV2LogDrains2$inboundSchema),
        z.lazy(() => GetAllLogDrainsFilterV2LogDrains1$inboundSchema),
    ]).optional(),
});
/** @internal */
export const GetAllLogDrainsDrains1$outboundSchema = z.object({
    id: z.string(),
    ownerId: z.string(),
    name: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
    schemas: z.lazy(() => GetAllLogDrainsDrainsSchemas$outboundSchema).optional(),
    delivery: z.union([
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains1$outboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains2$outboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains3$outboundSchema),
        z.lazy(() => GetAllLogDrainsDeliveryLogDrains4$outboundSchema),
    ]).optional(),
    sampling: z.array(z.lazy(() => GetAllLogDrainsDrainsSampling$outboundSchema))
        .optional(),
    teamId: z.nullable(z.string()).optional(),
    status: GetAllLogDrainsDrainsLogDrainsStatus$outboundSchema.optional(),
    disabledAt: z.number().optional(),
    disabledReason: GetAllLogDrainsDrainsDisabledReason$outboundSchema.optional(),
    disabledBy: z.string().optional(),
    firstErrorTimestamp: z.number().optional(),
    source: z.union([
        z.lazy(() => GetAllLogDrainsSourceLogDrains2$outboundSchema),
        z.lazy(() => GetAllLogDrainsSourceLogDrains1$outboundSchema),
    ]),
    filter: z.string().optional(),
    filterV2: z.union([
        z.lazy(() => GetAllLogDrainsFilterV2LogDrains2$outboundSchema),
        z.lazy(() => GetAllLogDrainsFilterV2LogDrains1$outboundSchema),
    ]).optional(),
});
export function getAllLogDrainsDrains1ToJSON(getAllLogDrainsDrains1) {
    return JSON.stringify(GetAllLogDrainsDrains1$outboundSchema.parse(getAllLogDrainsDrains1));
}
export function getAllLogDrainsDrains1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsDrains1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsDrains1' from JSON`);
}
/** @internal */
export const ResponseBodyDrains$inboundSchema = z.union([
    z.array(z.lazy(() => GetAllLogDrainsDrains1$inboundSchema)),
    z.array(z.lazy(() => GetAllLogDrainsDrains2$inboundSchema)),
]);
/** @internal */
export const ResponseBodyDrains$outboundSchema = z.union([
    z.array(z.lazy(() => GetAllLogDrainsDrains1$outboundSchema)),
    z.array(z.lazy(() => GetAllLogDrainsDrains2$outboundSchema)),
]);
export function responseBodyDrainsToJSON(responseBodyDrains) {
    return JSON.stringify(ResponseBodyDrains$outboundSchema.parse(responseBodyDrains));
}
export function responseBodyDrainsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyDrains$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyDrains' from JSON`);
}
/** @internal */
export const GetAllLogDrainsResponseBody1$inboundSchema = z.object({
    drains: z.union([
        z.array(z.lazy(() => GetAllLogDrainsDrains1$inboundSchema)),
        z.array(z.lazy(() => GetAllLogDrainsDrains2$inboundSchema)),
    ]),
});
/** @internal */
export const GetAllLogDrainsResponseBody1$outboundSchema = z.object({
    drains: z.union([
        z.array(z.lazy(() => GetAllLogDrainsDrains1$outboundSchema)),
        z.array(z.lazy(() => GetAllLogDrainsDrains2$outboundSchema)),
    ]),
});
export function getAllLogDrainsResponseBody1ToJSON(getAllLogDrainsResponseBody1) {
    return JSON.stringify(GetAllLogDrainsResponseBody1$outboundSchema.parse(getAllLogDrainsResponseBody1));
}
export function getAllLogDrainsResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsResponseBody1' from JSON`);
}
/** @internal */
export const GetAllLogDrainsResponseBody$inboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsResponseBody1$inboundSchema),
    z.array(z.lazy(() => GetAllLogDrainsResponseBody2$inboundSchema)),
]);
/** @internal */
export const GetAllLogDrainsResponseBody$outboundSchema = z.union([
    z.lazy(() => GetAllLogDrainsResponseBody1$outboundSchema),
    z.array(z.lazy(() => GetAllLogDrainsResponseBody2$outboundSchema)),
]);
export function getAllLogDrainsResponseBodyToJSON(getAllLogDrainsResponseBody) {
    return JSON.stringify(GetAllLogDrainsResponseBody$outboundSchema.parse(getAllLogDrainsResponseBody));
}
export function getAllLogDrainsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLogDrainsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLogDrainsResponseBody' from JSON`);
}
//# sourceMappingURL=getalllogdrainsop.js.map