/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../../lib/schemas.js";
import { EventsAggregationSelection$inboundSchema, EventsAggregationSelection$outboundSchema, } from "./eventsaggregationselection.js";
import { EventsSimpleFieldSelection$inboundSchema, EventsSimpleFieldSelection$outboundSchema, } from "./eventssimplefieldselection.js";
import { EventsTimeBasedGroupBySelection$inboundSchema, EventsTimeBasedGroupBySelection$outboundSchema, } from "./eventstimebasedgroupbyselection.js";
/** @internal */
export const EventsSelection$inboundSchema = z.union([
    EventsAggregationSelection$inboundSchema,
    EventsTimeBasedGroupBySelection$inboundSchema,
    EventsSimpleFieldSelection$inboundSchema,
]);
/** @internal */
export const EventsSelection$outboundSchema = z.union([
    EventsAggregationSelection$outboundSchema,
    EventsTimeBasedGroupBySelection$outboundSchema,
    EventsSimpleFieldSelection$outboundSchema,
]);
export function eventsSelectionToJSON(eventsSelection) {
    return JSON.stringify(EventsSelection$outboundSchema.parse(eventsSelection));
}
export function eventsSelectionFromJSON(jsonString) {
    return safeParse(jsonString, (x) => EventsSelection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsSelection' from JSON`);
}
//# sourceMappingURL=eventsselection.js.map